Download 186
Last updated Feb 21, 2024


Describes one or more of your AWS EC2 subnets.

aws-ec2-subnets [profile=PROFILE] [region=REGION]
The identifier of AWS connect profile
AWS region

AWS IAM Policy

To use this command, you must allow the below permissions in your AWS IAM policy:

  • ec2:DescribeSubnets

Output Fields

aws_profileStringConnect profileThe identifier of AWS connect profile
regionStringRegione.g. ap-northeast-2
azStringAvailability Zonee.g. ap-northeast-2a
subnet_idStringSubnet ID
vpc_idStringVPC ID
default_azBoolDefault AZ
cidr_blockStringCIDR blocke.g.
stateStringStatee.g. available, pending
available_ip_countIntegerAvailable IP counte.g. 4087
owner_idStringOwner ID
assign_ipv6_on_creationBoolAssign IPv6 on creation
map_public_ip_on_launchBoolMap public IP on launch
subnet_arnStringSubnet ARN
ipv6_cidr_block_associationsListIPv6 CIDR block associationsElements with assoc_id, ipv6_cidr_block, state, and state_msg properties.
tagsListTagsElements with key and value properties.