Introduction
The Elastic Compute Cloud (EC2) instances are essentially virtual machines provided by Amazon Web Services (AWS).
EC2 provides a wide range of instance types, allowing users to select the size and configuration that best suits their needs.
We can launch EC2 instances on demand and scale up or down as needed to match our workload requirements.
Deploying Elastic Compute Cloud (EC2) in AWS
Step 1. Log into your AWS Console and select the region to deploy the EC2.
Step 2. Click the Services, select the Compute, and then select EC2.
Step 3. Click Launch instance.
Step 4. Enter the Name of your instance. Choose an Amazon Machine Image (AMI) under the Application and OS images. An Amazon Machine Image (AMI) is a pre-configured virtual machine template for our EC2 instance.
Step 5. The Core and GUI versions are available under the Amazon Machine Image (AMI); select your desired version.
Step 6. Key pairs consist of public and private keys. The public key is stored on the EC2 instance, while the user keeps the private key secure. The private key authenticates your identity when you attempt to connect to your instance (typically via SSH for Linux instances or RDP for Windows). If you have never created, click Create new key pair.
Step 7. Enter the name for the key pair, select the type RSA, select the private key file format, select .pem, and click Create key pair.
Note. Store the key pair in a safe place. You will use it to log in to your instance.
Step 8. In the Network settings, we must initially change the VPC we created. Click the Edit button.
Step 9. We selected the correct VPC; if you have more Subnets, you can select the correct subnet and Enable the Auto-assign public IP because the VPC does not have the Public IP.
Step 10. EC2 instances require storage for the operating system, applications, and data. You can add and configure storage volumes for your instance and choose from different types of storage, including Amazon Elastic Block Store (EBS) volumes and instance store volumes.
Step 11. Review all the details to ensure everything is correct. You can also modify any necessary settings. Click the Launch instance button.
Summary
In this article, we learned how to deploy the EC2 instance in AWS; in the next article, we will learn how to connect it.