This lab walks you through creating a VPC, some subnets, an Internet Gateway, a route table, and then configuring these services to work together to form an effective VPC. We will then launch an EC2 instance. into the VPC and create a web page using AWS CLI commands.
Duration: 1 hour 15 minutes
AWS Region: US East (N. Virginia) us-east-1
Log into the AWS Management Console.
Create an IAM Role.
Launching an EC2 Instance
SSH into EC2 Instance
Create a VPC using AWS CLI.
Create a Subnet.
Create an Internet Gateway using AWS CLI
Attach Internet gateway to VPC.
Create a custom Route table.
Create a public route in the Route table that points to the Internet gateway using AWS CLI.
Associate the subnet to your Route table.
AWS CLI command to create Security Group
Create a security group rule with AWS CLI
Create a new key pair.
Store User Data in a File
AWS CLI command to create EC2s
Allocate an Elastic IP address.
Attach the Elastic IP with EC2 Instance.