You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. From the [EC2 Homepage](https://console.aws.amazon.com/ec2), click on "Launch Instance" and follow the wizard:
162
-
* Select Ubuntu Server 16.04 with at least 8GiB memory and 30GiB storage size.
163
-
* In "Configure Security Group", under "Source", use the IP address of the machine you will be connecting from.
162
+
* **Step 1: Choose AMI**: Select Ubuntu Server 16.04
163
+
* **Step 2: Choose instance type**: Choose at least 8GiB memory (e.g. `t2.large`)
164
+
* **Step 3: Configure Instance**: Set IAM Role to `DeveloperEC2`
165
+
* **Step 4: Storage**: Increase storage to 32GiB
166
+
* **Step 6: Configure Security Group**: Under "Source", use the IP address of the machine you will be connecting from. (Optional, as long as you use a key pair in the next step).
164
167
1. Launch the instance. When asked for a key pair, you can create a new key pair (be sure to download and save the .pem file) or use an existing key pair that you have the .pem file for.
165
-
1. In the AWS EC2 dashboard, find your new instance in the list and select it. Click "Actions > Instance Settings > Attach/Replace IAM Role", then select "DeveloperEC2". Click "Apply".
166
-
1. Connect to the instance by selecting the instance in the AWS EC2 dashboard and clicking "Connect". Follow the provided instructions in order to connect via ssh or PuTTY.
168
+
1. Connect to the instance by selecting the instance in the AWS EC2 dashboard and clicking "Connect". Follow the provided instructions in order to connect via ssh or PuTTY. Upon completing this step, you should be able to connect to your instance via a command like `ssh -i <keyname>.pem <public-dns-name>`.
169
+
1. Optionally, update your ssh config so that you can connect using a shorter command:
170
+
* move your private key to `~/.ssh/<keyname>.pem`
171
+
* add the following lines to ~/.ssh/config:
172
+
```
173
+
Host yourname-ec2
174
+
Hostname <public-dns-name>
175
+
User ubuntu
176
+
PreferredAuthentications publickey
177
+
IdentityFile ~/.ssh/<keyname>.pem
178
+
```
179
+
* run `ssh yourname-ec2` to connect to your instance
167
180
1. Go back up to the [overview](#overview) and run the commands there.
0 commit comments