How can I create and connect to an Amazon Linux 2 EC2 instance?

Last updated: 2020-11-24

I want to create an Amazon Elastic Compute Cloud (Amazon EC2) instance that runs Amazon Linux 2. How do I do that?

Short description

Amazon Web Services provides an AWS Free Tier option for evaluation purposes. The AWS Free Tier provides access to many products and services, including Amazon EC2, at no cost, within certain limitations. After creating an AWS account you can quickly create an Amazon Linux Free Tier eligible instance with a public IP address.

Resolution

Preliminary steps

  1. Create an AWS account.
  2. Open the Amazon EC2 console.
  3. From the Region selector in the navigation bar, select the Region that is geographically closest to you. All resources that are required to run your instance must be created in the same Region.
  4. You need a key pair to transfer files between your computer and the instance. From the EC2 Dashboard, select Key Pairs to create key pairs. For detailed steps to create key pairs, see Create a key pair. If you plan to connect to your Amazon Linux instance from Windows, be sure to follow the instructions in the section titled (Optional) To prepare to connect to a Linux instance from Windows using PuTTY. Then, save the resulting .ppk file to the same folder as the .pem file that you downloaded.

Create an EC2 instance

For detailed instructions about launching a new instance, see Launch an instance.

After status checks are successfully completed and the Instance state status is running, connect to your instance.

To avoid unnecessary charges on your account, stop your instance when you're not using it. While using Free Tier, be sure that you understand the pricing guidelines. When you are finished with your instance, clean up by terminating the instance.


Did this article help?


Do you need billing or technical support?