File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change 1- #! /bin/sh
2- # Use this to install software packages
3- if VERB=" $( which apt-get ) " 2> /dev/null; then
4- sudo apt-get update -y
5- elif VERB=" $( which yum ) " 2> /dev/null; then
6- sudo yum update -y
7- else
8- echo " WARNING: Could not update the system" >&2
9- fi
1+ #! /bin/bash
102
11- echo ' docker here ------------' > /tmp/output.txt
12- which docker >> /tmp/output.txt
13- echo ' s3 buckets ------------' >> /tmp/output.txt
14- aws s3 ls s3://tudelft-results-of-calculations >> /tmp/output.txt
15- echo ' who am I ------------' >> /tmp/output.txt
16- whoami >> /tmp/output.txt
17- echo ' current dir ------------' >> /tmp/output.txt
18- pwd >> /tmp/output.txt
19- echo ' files in dir ------------' >> /tmp/output.txt
20- ls -l >> /tmp/output.txt
3+ # Install SSM agent, so you can log in. This us the Ubuntu version
4+ # See https://repost.aws/knowledge-center/install-ssm-agent-ec2-linux#
5+ mkdir /tmp/ssm
6+ cd /tmp/ssm
7+ wget https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_amd64/amazon-ssm-agent.deb
8+ sudo dpkg -i amazon-ssm-agent.deb
9+ sudo systemctl enable amazon-ssm-agent
2110
22- aws s3 cp /tmp/output.txt s3://tudelft-results-of-calculations
2311sudo shutdown -h now
You can’t perform that action at this time.
0 commit comments