Search code examples
amazon-web-servicesamazon-ec2aws-cloudformationaws-cloudformation-custom-resource

How to launch Spot fleet with CreditSpecification using CFT?


I am using t3a.large instance for my spot fleet, however I could not launch the spot fleet in CreditSpecifications=standard mode to save cost. Can someone tell me how can I achieve this in CFT?

Not : For EC2 we have this CFT properties to set

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-creditspecification.html


Solution

  • For the spot fleet I think you need to setup that option in your launch template: AWS::EC2::LaunchTemplate CreditSpecification.