In this step, you will create two virtual machines in two Public Subnet 2 of two VPC. This exercise will assume that you are familiar with the EC2 initialization process, so the instructions below will be very brief. If you are still not familiar with the EC2 initialization process, refer to the lab Initialize EC2 VMs.
In the EC2 interface
Perform configuration EC2
EC2 - My VPC
Choose Instance type: t2.micro
In the Create key pair interface
vpcpeering-key
Network: My VPC
Subnet: My VPC Public Subnet (AZ2)
Auto-assign Public IP: Enable
Security group, select My VPC SG
Then select Launch instance
Select View all instance to view information instance
Configure instance
Name, enter EC2 - HG VPC
Choose AMI: Amazon Linux 2 AMI (HVM), SSD Volume Type
Choose Instance type: t2.micro
Perform configuration Network
ping <EC2 Public IPv4> -c5
)To connect SSH to EC2 we have a way. Connect Amazon EC2 Linux 2 using MobaXterm and connect Amazon EC2 Linux 2 using PuTTY. Here I connect Amazon EC2 Linux 2 using PuTTY.
You can review how to connect SSH to EC2 access at Lab About Amazon EC2 section 4.2 .
You will see a successful ping because the two instances are communicating with each other over the Public Internet.