The cloud provides on-demand delivery of computing services over the internet. You can access technology services, such as computing power, storage, and databases, on an as-needed basis from a cloud provider like Amazon Web Services (AWS).
What is an EC2 Instance?
AWS Elastic Cloud Compute service (EC2) are virtual servers that run in the cloud. Instead of buying, owning, and maintaining physical data centers and servers, EC2 provides scalable computing capacity in the Amazon Web Services (AWS) Cloud.
This article will walk through creating an EC2 instance from the AWS management console and how to connect to it locally using Secure Shell (SSH). Since this is a test, we will only use free tier eligible services. In addition, the AWS console is continuously improving; therefore, some panes may have moved, and the console may look different.
- An AWS cloud account;
- Familiarity with the terminal.
LAUNCH AN EC2 INSTANCE
STEP 1: Sign in to the AWS console, search for EC2 in the search bar and select the first option.
STEP 2: From the Instances pane, choose Launch instances.
STEP 3: Give your instance a name.
STEP 4: Select Amazon Linux under Application and OS images and leave the AMI as default.
More on AWS AMI here.
STEP 5: Choose t2.micro as the instance type.
STEP 6: Under Key pair, select Create new key pair.
b. Name your key and leave the options as default. Choose Create key pair to download the key to your local computer.
STEP 8: Under Network settings, select Edit
b. Leave the default VPC and select the first subnet from the dropdown.
c. Select Enable from the Auto-assign public IP dropdown.
STEP 9: Choose Create security group and enter a name and description
STEP 10: Under Inbound security group rules, leave as default.
STEP 11: Leave Storage and Advanced settings as default and select Launch Instance
We have successfully created a running server. Select view instances to view details of the running instance.
CONNECT TO AN INSTANCE
Now let’s connect to our running instance.
On the EC2 pane, select Connect to the instance and select SSH client.
We have connected locally to the running instance.
If you followed this walkthrough, we were able to launch an EC2 instance and connect locally using ssh.
Thanks for reading!