| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Auto Scaling launch configurations cannot be changed. If you want to modify your bid price for Spot Instances, you must create a new launch configuration.
If, for example, you want to launch a set of Spot Instances that have a higher likelihood of running uninterrupted for a long time, you can use a higher bid price. To do this, you must create a new launch configuration, using the same procedure that you followed earlier in this walkthrough. (For more information, go to Step 1: Create a Launch Configuration.)
Specify the following values:
Launch configuration name = spotlc-7cents
Image ID = ami-e565ba8c
Note
If you don't have an AMI, and you want to find a suitable one, see Amazon Machine Images (AMIs).
Instance type = m1.small
Spot price = $0.07
Your command should look similar to the following example:
as-create-launch-config spotlc-7cents --image-id ami-e565ba8c --instance-type m1.small --spot-price "0.07"
You should get a confirmation like the following example:
OK-Created launch config
After you have created the new launch configuration successfully, create a new Auto Scaling group specifying the new launch configuration.
Your command should look similar to the following example:
as-create-auto-scaling-group spotasg-7cents --launch-configuration spotlc-7cents --availability-zones "us-east-1a,us-east-1b" --max-size 5 --min-size 10 --desired-capacity 3
You should get a confirmation like the following example:
OK-Created AutoScalingGroup
You can view the status of your Spot bid and a list of the bids that Auto Scaling placed for you by running as-describe-scaling-activities
soon after you create your Auto Scaling group.
Your command should look similar to the following example:
as-describe-scaling-activities --headers
If not all your bids are fulfilled, you will get information that looks like the following example:
ACTIVITY ACTIVITY-ID END-TIME GROUP-NAME CODE MESSAGE ACTIVITY 5879cc50-1e40-4539-a754-1cb084f1aecd spotasg-7cents WaitingForSpotInstanceId Placed Spot instance request: sir-93828812. Waiting for instance(s) ACTIVITY 777fbe1b-7a24-4aaf-b7a9-d368d0511878 spotasg-7cents WaitingForSpotInstanceId Placed Spot instance request: sir-016cf812. Waiting for instance(s) ACTIVITY f4b00f81-eaea-4421-80b4-a2e3a35cc782 spotasg-7cents WaitingForSpotInstanceId Placed Spot instance request: sir-cf60ea12. Waiting for instance(s) ACTIVITY 31bcbb67-7f50-4b88-ae7e-e564a8c80a90 spotasg WaitingForSpotInstanceId Placed Spot instance request: sir-fc8a3014. Waiting for instance(s) ACTIVITY 770bbeb5-407c-404c-a826-856f65db1c57 spotasg WaitingForSpotInstanceId Placed Spot instance request: sir-69101014. Waiting for instance(s) ACTIVITY 597e4ebd-220e-42bc-8ac9-2bae4d20b8d7 2012-05-23T17:40:22Z spotasg Successful ACTIVITY eca158b4-a6f9-4ec5-a813-78d42c1738e2 2012-05-23T17:40:22Z spotasg Successful ACTIVITY 1a5bd6c6-0b0a-4917-8cf0-eee1044a179f 2012-05-23T17:22:19Z spotasg Successful ACTIVITY c285bf16-d2c4-4ae8-acad-7450655facb5 2012-05-23T17:22:19Z spotasg Successful ACTIVITY 127e3608-5911-4111-906e-31fb16d43f2e 2012-05-23T15:38:06Z spotasg Successful ACTIVITY bfb548ad-8bc7-4a78-a7db-3b41f73501fc 2012-05-23T15:38:07Z spotasg Successful ACTIVITY 82d2b9bb-3d64-46d9-99b6-054a9ecf5ac2 2012-05-23T15:30:28Z spotasg Successful ACTIVITY 95b7589b-f8ac-49bc-8c83-514bf664b4ee 2012-05-23T15:30:28Z spotasg Successful ACTIVITY 57bbf77a-99d6-4d94-a6db-76b2307fb9de 2012-05-23T15:16:34Z spotasg Successful ACTIVITY cdef758e-0be2-416e-b402-0ef521861039 2012-05-23T15:16:17Z spotasg Successful ACTIVITY d7e0a3ed-7067-4583-8a87-1561b3de2aed 2012-05-23T14:51:46Z spotasg Successful ACTIVITY da5471ab-482c-4680-b430-99e4173d2bd7 2012-05-23T14:52:48Z spotasg Successful ACTIVITY 78701f3d-a747-46e1-8b0f-8aff22834f46 2012-05-23T14:38:17Z spotasg Successful ACTIVITY 274d4772-3614-4f5c-8858-026b33635be3 2012-05-23T14:38:16Z spotasg Successful ACTIVITY 1024abb2-bf84-4fae-b717-a398bac91c4f 2012-05-23T14:22:39Z spotasg Successful
Bids are represented by values such as sir-93828812 and sir-016cf812.
When you create a new launch configuration that sets a new bid price for Spot Instances, and you have Spot Instances already running based on a different price, these instances will continue running and will only be terminated if the Spot market price goes above the bid price on which it was based.
What do you want to do next?