Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.


Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). For more information about how large to make your VPC, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.

You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. The IPv6 CIDR block uses a /56 prefix length, and is allocated from Amazon's pool of IPv6 addresses. You cannot choose the IPv6 range for your VPC.

By default, each instance you launch in the VPC has the default DHCP options, which include only a default DNS server that we provide (AmazonProvidedDNS). For more information, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.


Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.

Type: Boolean

Required: No


The IPv4 network range for the VPC, in CIDR notation. For example,

Type: String

Required: Yes


Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No


The tenancy options for instances launched into the VPC. For default, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For dedicated, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of dedicated or host into a dedicated tenancy VPC.

Important: The host value cannot be used with this parameter. Use the default or dedicated values only.

Default: default

Type: String

Valid Values: default | dedicated | host

Required: No

Response Elements

The following elements are returned by the service.


The ID of the request.

Type: String


Information about the VPC.

Type: Vpc object


For information about the errors that are common to all actions, see Common Client Errors.


Example 1

This example creates a VPC with the IPv4 CIDR block

Sample Request &CidrBlock= &AUTHPARAMS

Sample Response

<CreateVpcResponse xmlns=""> <requestId>63c5a2ed-4195-4445-b841-294629e7d8bd</requestId> <vpc> <vpcId>vpc-06b7830650EXAMPLE</vpcId> <ownerId>111122223333</ownerId> <state>pending</state> <cidrBlock></cidrBlock> <cidrBlockAssociationSet> <item> <cidrBlock></cidrBlock> <associationId>vpc-cidr-assoc-017043e963EXAMPLE</associationId> <cidrBlockState> <state>associated</state> </cidrBlockState> </item> </cidrBlockAssociationSet> <ipv6CidrBlockAssociationSet/> <dhcpOptionsId>dopt-19edf471</dhcpOptionsId> <tagSet/> <instanceTenancy>default</instanceTenancy> <isDefault>false</isDefault> </vpc> </CreateVpcResponse>

Example 2

This example creates a VPC with the dedicated tenancy option.

Sample Request &CidrBlock= &InstanceTenancy=dedicated &AUTHPARAMS

Sample Response

<CreateVpcResponse xmlns=""> <requestId>1d536f17-5a03-4030-95b4-4d051e65e7bb</requestId> <vpc> <vpcId>vpc-07ddea827dEXAMPLE</vpcId> <ownerId>111122223333</ownerId> <state>pending</state> <cidrBlock></cidrBlock> <cidrBlockAssociationSet> <item> <cidrBlock></cidrBlock> <associationId>vpc-cidr-assoc-0cc7b90dfeEXAMPLE</associationId> <cidrBlockState> <state>associated</state> </cidrBlockState> </item> </cidrBlockAssociationSet> <ipv6CidrBlockAssociationSet/> <dhcpOptionsId>dopt-19edf471</dhcpOptionsId> <tagSet/> <instanceTenancy>dedicated</instanceTenancy> <isDefault>false</isDefault> </vpc> </CreateVpcResponse>

Example 3

This example creates a VPC and requests an IPv6 CIDR block for the VPC.

Sample Request &CidrBlock= &AmazonProvidedIpv6CidrBlock=true &AUTHPARAMS

Sample Response

CreateVpcResponse xmlns=""> <requestId>b1a2b2b5-5806-4e24-824b-0c8996c608c1</requestId> <vpc> <vpcId>vpc-03914afb3ed6c7632</vpcId> <ownerId>111122223333</ownerId> <state>pending</state> <cidrBlock></cidrBlock> <cidrBlockAssociationSet> <item> <cidrBlock></cidrBlock> <associationId>vpc-cidr-assoc-03ca48bbbeEXAMPLE</associationId> <cidrBlockState> <state>associated</state> </cidrBlockState> </item> </cidrBlockAssociationSet> <ipv6CidrBlockAssociationSet> <item> <ipv6CidrBlock></ipv6CidrBlock> <associationId>vpc-cidr-assoc-0bd6cc7621EXAMPLE</associationId> <ipv6CidrBlockState> <state>associating</state> </ipv6CidrBlockState> </item> </ipv6CidrBlockAssociationSet> <dhcpOptionsId>dopt-19edf471</dhcpOptionsId> <tagSet/> <instanceTenancy>default</instanceTenancy> <isDefault>false</isDefault> </vpc> </CreateVpcResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: