AWS::EC2::VPCSpecifies a virtual private cloud (VPC). To add an IPv6 CIDR block to the VPC, see [AWS::EC2::VPCCidrBlock](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html). For more information, see [Virtual private clouds (VPC)](https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html) in the *Amazon VPC User Guide*.
7 configurable properties. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
CidrBlock | string | Create-only |
EnableDnsHostnames | boolean | |
EnableDnsSupport | boolean | |
InstanceTenancy | string | |
Ipv4IpamPoolId | string | Create-onlyWrite-only |
Ipv4NetmaskLength | integer | Create-onlyWrite-only |
Tags | Array<Tag> |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
CidrBlockAssociations | Array<string> | - |
DefaultNetworkAcl | string | - |
DefaultSecurityGroup | string | - |
Ipv6CidrBlocks | Array<string> | - |
VpcId | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::VPC
Resources:
MyResource:
Type: AWS::EC2::VPC
Properties:
Tags:
- Key: Environment
Value: ProductionPermissions CloudFormation needs in your IAM role to manage this resource.
ec2:DescribeVpcsec2:DescribeSecurityGroupsec2:DescribeNetworkAclsec2:DescribeVpcAttributeec2:CreateVpcec2:DescribeVpcsec2:DescribeVpcAttributeec2:ModifyVpcAttributeec2:CreateTagsec2:CreateTagsec2:ModifyVpcAttributeec2:DescribeVpcAttributeec2:DeleteTagsec2:ModifyVpcTenancyec2:DescribeVpcsec2:DeleteVpcec2:DescribeVpcsEverything you need to know about EC2 on one page. HD quality, print-friendly.
Download Free InfographicVpcIdThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
CidrBlockIpv4IpamPoolIdIpv4NetmaskLength