CloudFormation - LaunchTemplate MarketType
Customer is looking at using CloudFormation for launching a mix of On-Demand and Spot Instances for their application, and wanted to know what to put into the MarketType option to achieve that. It seems that the only acceptable value is Spot, so how would they handle doing a mix of On-Demand and Spot Instances? If they put Spot in for that value, it will only deploy Spot Instances. Is there a way to have it try Spot Instances and if the conditions aren't me, then launch On-Demand instances?
The recommended approach for launching a mix of Spot Instances and On-Demand instances is by using EC2 Auto Scaling Groups. These will allow configuring a flexible approach with multiple instance types and availability zones, in order to follow best practices and tap into multiple Spot capacity pools. It will also allow the use of allocation strategies like Capacity Optimized to minimize the amount of interruptions and launch Spot Instances from the most-available capacity pools. Please refer to the Spot best practices user-guide page that details the allocation strategies, instance diversification, rebalance recommendation, etc. These will help to successfully adopt Spot for their Stateless, Fault-tolerant and flexible workloads.
EC2 Auto Scaling does not dynamically modify the mix of On-Demand and Spot Instances in the group, so it will not launch On-Demand capacity if Spot Instances cannot be launched. However, if Spot best practices are followed (instance type + AZ diversification, using the capacity-optimized allocation strategy), it will increase the chance of achieving the desired scale with Spot Instances.
How to append timestamp to s3 bucket name in suffix using cloudformation template?asked a day ago
Cloudformation - Update CIDR Range in Stack WITHOUT Terminating All RDS, ELB's InstancesAccepted AnswerMODERATORasked 4 years ago
Can I know the size of spot capacity pools?asked a month ago
Spot instances for inference and sagemaker?asked 3 months ago
Is it possible to use CloudFront Functions with CloudFormation, and have the source code in an external file?asked a month ago
CloudFormation - LaunchTemplate MarketTypeAccepted Answerasked 2 years ago
Cloudformation support for creating configurationsasked 3 years ago
Code Style guide for AWS Cloudformation and CDKAccepted Answerasked 7 months ago
CloudFormation structuring & splitting of resources between stacksAccepted Answerasked 2 years ago
What is the CloudFormation equivalent of the "Restricted" user?asked 3 years ago