Today, we are happy to announce some enhancements we’ve made to our “Request EC2 Spot Instances” action.
We have added the ability to specify user data in either raw or base-64-encoded formats. This option allows you to initialize your spot instances using cloud-init and startup scripts. More information about cloud-init and running commands at instance-launch-time can be found here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html.
We have added the ability to assign an Elastic IP address to one of your spot instances. For example, if you requested 3 spot instances, you can assign an Elastic IP address to the first one that becomes available.
We have added the ability to terminate your requested spot instances. Termination can happen either at a fixed time after the action starts, or a fixed time after each instance is launched.
For example, you can run your instances until 3 hours after the action was started. All instances will be terminated at the same time.
Another example, your instances can each run for 3 hours. Each instance will be terminated after it has been running for 3 hours.
Spot instances can be an effective way to utilize extra EC2 power at a lower cost. We hope that these enhancements make this action a powerful tool in your arsenal and allows you to make better use of EC2 spot instances.