Skip to main content

EC2 Subnet

An EC2 Subnet is a range of IP addresses in your Amazon Virtual Private Cloud (VPC). You can launch AWS resources into a specified subnet. This allows you to create a more granular network allocation and helps isolate resources effectively. Subnets can be made publicly accessible for resources that need external access or kept private for internal resources only. For more detailed information, you can refer to the official AWS documentation.

Terraform Mappings:

  • aws_route_table_association.subnet_id
  • aws_subnet.id

Supported Methods​

  • GET: Get a subnet by ID
  • LIST: List all subnets
  • SEARCH: Search for subnets by ARN

ec2-vpc​

The EC2 Subnet is related to the EC2 VPC as each subnet is a subdivision within a VPC. Creating a subnet within a VPC allows for deploying resources into a logically isolated section of the VPC, thereby enabling better segmentation and easier management of network traffic, security, and costs within the Virtual Private Cloud environment.