In the previous step, you launched your instance into a public subnet — a subnet that has a route to an Internet gateway. However, the instance in your subnet also needs a public IP address to be able to communicate with the Internet. By default, an instance in a nondefault VPC is not assigned a public IP address. In this step, you’ll allocate an Elastic IP address to your account, and then associate it with your instance.
The following diagram represents the architecture of your VPC after you’ve completed this step.
To allocate and assign an Elastic IP address
1.Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.
2.In the navigation pane, choose Elastic IPs.
3.Choose Allocate New Address, and then Yes, Allocate.
If your account supports EC2-Classic, first select EC2-VPC from the Network platform list.
4.Select the Elastic IP address from the list, choose Actions, and then choose Associate Address.
5.In the dialog box, choose Instance from the Associate with list, and then select your instance from theInstance list. Choose Yes, Associate when you’re done.
Your instance is now accessible from the Internet. You can connect to your instance through its Elastic IP address using SSH or Remote Desktop from your home network.
This completes the exercise; you can choose to continue using your instance in your VPC, or if you do not need the instance, you can terminate it and release its Elastic IP address to avoid incurring charges for them. You can also delete your VPC — note that you are not charged for the VPC and VPC components created in this exercise (such as the subnets and route tables).
- Step 1: Create the VPC
- Step 2: Create a Security Group
- Step 3: Launch an Instance into Your VPC
- Step 4: Assign an Elastic IP Address to Your Instance
- Step 5: Clean Up
Source By: <docs.aws.amazon.com>
To Become AWS Certified please Check out the Link;