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

2 minute read

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

Short description

AWS provides an AWS Free Tier option for evaluation purposes. After you create an AWS account, you can use Amazon Linux Free Tier to create an EC2 instance with a public IP address.


Complete the prerequisite steps

Before you create the instance, complete the following steps:

  1. Create an AWS account.
  2. Open the Amazon EC2 console.
  3. In the navigation pane, choose your AWS Region.
    Note: You must create all instance-related resources in the same Region as the instance.
  4. Create a key pair to transfer files between your computer and the instance.

To connect to your Amazon Linux instance from Windows, see Connect to your Linux instance from Windows with PuTTY. Then, save the .ppk file to the same folder as the .pem file that you downloaded.

Launch and connect to your instance

Complete the steps to launch an instance.

After the status checks complete 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. When you're finished with your instance, terminate the instance to clean it up.

Related information

Tutorial: Get started with Amazon EC2 Linux instances

AWS OFFICIALUpdated 8 months ago