| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Amazon Virtual Private Cloud (Amazon VPC) lets you define a virtual networking environment in a private, isolated section of the Amazon Web Services (AWS) cloud. You have complete control of this virtual network and you can use advanced security features and network access control at the instance level and subnet level. For more information about Amazon VPC, see the Amazon Virtual Private Cloud User Guide.
If you want to take advantage of the features of Amazon VPC when you use Spot Instances, specify in your Spot request that your instances are to be launched in Amazon VPC. To ensure that your Spot Instances are launched in Amazon VPC:
Determine if your AWS account supports a default VPC. For more information, see Detecting Your Supported Platforms and Whether You Have a Default VPC.
If your AWS account supports a default VPC, and
You want to launch your Spot Instances in that VPC
You don't have to perform any additional steps when you request Spot Instances. The Request Spot Instances wizard selects the subnet ID of your default VPC in which to launch the instance.
You want to use a different VPC for the Spot Instances
Create a new Amazon VPC and specify the subnet ID of the VPC that you just created.
Note
Support for default VPC is available in select regions, and will be available in all regions soon. For more information, see Default VPC Basics.
If your AWS account does not support a default VPC, create an Amazon VPC and specify the subnet of the VPC that you just created.
This topic discusses what you need to know if you want your Spot Instances to launch in an Amazon VPC and your account does not support default VPCs, or your account supports default VPCs but you want your Spot Instances to launch in a VPC that is not the default.
For more information about setting up an Amazon VPC, see Getting Started with Amazon VPC in the Amazon Virtual Private Cloud Getting Started Guide.
The following video shows how to launch your first Spot Instance in the Amazon Virtual Private Cloud (Amazon VPC) using the AWS Management Console. This video includes instructions for creating your Amazon VPC subnet, placing a bid, determining when the instance is fulfilled, and canceling the instance.
The process for making a Spot Instance request that launches in Amazon VPC is the same as the process you follow when you make a Spot Instance request in a non-VPC portion of Amazon EC2. The main differences are that you:
Base your Spot price bid on Spot price history of Spot Instances in VPCs.
When you use the DescribeSpotPriceHistory action or the ec2-describe-spot-price-history command,
add Amazon VPC to the product-description filter. For example:
PROMPT>ec2-describe-spot-price-history -s '2011-09-08T00:00:00Z' -t m1.xlarge -d "Linux/UNIX (Amazon VPC)"
Using the AWS Management Console, check the Spot Price History page to see the Spot pricing history for Amazon EC2 instances running in both Amazon EC2 and Amazon VPC.

Specify the VPC subnet in which you want to launch your Spot Instance.
When you use the RequestSpotInstances action or the ec2-request-spot-instances command,
specify the ID of the Amazon VPC subnet in which you want to launch the Spot Instance.
PROMPT>ec2-request-spot-instances ami-8e1fece7 -t m1.xlarge -p '$0.01' -n 5 -r 'one-time' -s 'subnet-baab943d3'
When you launch the Request Instances Wizard from the Spot Instance page of the AWS Management Console, select a subnet after specifying that you're launching the Spot Instance into a VPC.

Note
The Request Spot Instances page shows the VPC option only if you have created a VPC and subnet before making the Spot Instance request.
For more information about using Amazon VPC, see the Amazon Virtual Private Cloud User Guide.