Htis task execute a custom resource to add Capacity provider to use Fargate Spot containers
Install dependecies on NodeJs Lambda :
cd lib/_fargateSpotService/
npm install
cd lib/_sendResponse/
npm install
CustomResourceStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: stacks/fargateSpot.yml
Parameters:
ServiceName: !GetAtt MyEcsService.Name
ClusterId: !Ref MyEcsCluster
Base: 1
Weight: 10