AWS Command Line Interface
Some instructions for creating, using, and terminating AWS instances using their Command Line Interface
Get AWS CLI
Install via pip:
Start EC2 Instance
Click EC2. Click the blue Launch Instance button. Select Ubuntu Server 18.04 LTS (64-bit x86). Click t2.micro for tests (Free tier eligible).
Click gray Configure Installation Details button.
Click shutdown behavior->terminate. Click Next: Add Storage.
Can add Elastic Block Store. AWS Free Tier includes 30GB storage, 2million I/Os, and 1GB of snapshot storage. Default is 8 GiB. If this works, click Next: Add Tags button.
Add a Tag for this instance.
If all good, click blue Review and Launch button. Review, then click blue Launch button.
Click “Create a new key pair” from drop down. Create a name. Click Download Key Pair. Save the .pem somewhere. Click Launch Instances.
Connect to the EC2 Instance
Click View Instances. Find your running instance. Scroll through Description to check that the key pair is what you think it should be. Change the permissions of the .pem to 400. The username is “ubuntu”. The instance name is listed under Description tab, has a copy icon. Connect via, e.g.,
Now What?
First, you can verify the disk size:
Note that it’s 7.7GB == 8 GiB. Can install everything via apt. For instance:
Update apt
Install pip3 (will get gcc, most python3)
Some services w/ libssl will need to be restarted, but should not disconnect.
Install numpy and scipy.
Terminate the Instance
Click Actions->Instance State->Terminate. It will destroy the EBS, so move any data off first.