About AWS VPC:
Amazon Virtual Private Cloud (VPC) is a logical isolation of your AWS resources in the cloud. It provides you with a private and secure network that you can use to connect your EC2 instances, S3 buckets, and other AWS resources.
A VPC is a virtual network that closely resembles a traditional network that you’d operate in your own data center, with the benefits of using the scalable infrastructure of AWS.
Followings are optional Component of a VPC:
Internet gateways (IGWs): An internet gateway allows communication between your VPC and the public internet.
Elastic IP (EIP): AWS Elastic IP is a feature provided by Amazon Web Services (AWS) that allows you to allocate a static public IPv4 address to your AWS resources, such as Amazon EC2 instances, NAT gateways, or Network Load Balancers.
VPC Endpoints: Virtual Private Cloud (VPC) endpoints enable you to privately access AWS services within your VPC without going over the internet.
VPC Peering: Peering refers to the process of connecting two Amazon Virtual Private Clouds (VPCs) together to enable communication between them using private IP addresses.
NAT Instance NAT Gateway: NAT Gateway simplifies outbound internet connectivity for resources in private subnets and provides a managed and scalable solution for address translation.
Virtual private gateways: A virtual private gateway allows communication between your VPC and your on-premises network.
The benefits of using a VPC:
Security: VPCs provide a layer of security for your AWS resources by isolating them from the public internet.
Scalability: VPCs can be scaled to meet the needs of your applications.
Cost-effectiveness: VPCs can help you to save money by allowing you to control the amount of traffic that goes to the public internet.
Configuring A Simple VPC with Single Availability Zone (AZ)
To create the VPC
- Open the Amazon VPC console at https://console.aws.amazon.com/vpc
- On the dashboard, choose Create VPC.
- For Resources to create, choose VPC and more.
- Configure the VPC.
- Enter a name for the VPC.
- For IPv4 CIDR block, you can keep the default suggestion, or alternatively you can enter the CIDR block required by your application or network.
- (Optional) If your application communicates by using IPv6 addresses, choose IPv6 CIDR block, Amazon-provided IPv6 CIDR block.
- Configure the subnets
- For Number of Availability Zones, choose 1. You can keep the default Availability Zone, or alternatively you can expand Customize AZs and select an Availability Zone.
- For Number of public subnets, choose 1.
- For Number of private subnets, choose 0.
- You can keep the default CIDR block for the public subnet, or alternatively you can expand Customize subnet CIDR blocks and enter a CIDR block.
- For NAT gateways, keep the default value, None.
- For VPC endpoints, choose None. A gateway VPC endpoint for S3 is used only to access Amazon S3 from private subnets.
- For DNS options, keep both options selected. As a result, your instance will receive a public DNS hostname that corresponds to its public IP address.
- Choose Create VPC.
Now Launch A EC2 Instance on your Created VPC:
Click EC2 Dashboard:
- Click Launch instance
- Name you ec2 instance
- Chose AMI for instance
- Keep the architecture file as defaults.
- Select Instance type t2.micro for Free tire or you can chose as per your need
- Select your key pair or create a new key pair for your instance
- Edit Network settings and select your created VPC from here.
- Enable Auto-assign public IP
- Select Security Group for your instance or select executing one if you have. By default the security group has an ssh port open for all.
- Keep the rest of the things as default.
- If everything is ok click Launch Instance to create your instance on your VPC.
Top comments (0)