Launch 2 EC2 Instances
Create and launch EC2 instances in the development environment
On the homepage:
On the EC2 page, click Launch instance
In the setup section, we will configure the following information as shown in the image:
- Name:
dev-ec2
- Application and OS Images: Amazon Linux 2023 AMI
- Instance type: t2.micro
- Select a key pair if you already have one. If not, create one as follows:
- Select Create new key pair
- Name:
my-key
- Type:
RSA
- Private key file:
.pem
- Click Create key pair
In the Network settings section, click Edit:
- VPC: development-vpc
- Subnet: choose the public subnet
- Auto-assign public IP: Enable
- Firewall:
- Select Select existing security group
- Choose the SG dev-ec2-sg we created earlier
- Finally, click Launch instance
Create and launch EC2 instances in the production environment
In the setup section, configure the following details as shown in the image:
- Name:
imga-server
- Application and OS Images: Amazon Linux 2023 AMI
- Instance type: t3.small
- Select a key pair if you already have one. If not, create one as follows:
- Select Create new key pair
- Name:
my-key
- Type:
RSA
- Private key file:
.pem
- Click Create key pair
In the Network settings section, click Edit:
- VPC: production-vpc
- Subnet: choose the private subnet
- Auto-assign public IP: Disable
- Firewall:
- Select Select existing security group
- Choose the SG prod-ec2-sg we created earlier
- Finally, click Launch instance
Lastly, I will check if both EC2 instances are running.