ECS Cloudformation Template for EC2 Launch Type

0

Which is the best place to look for sample ECS Cloudformation template for EC2 launch type. I have got many but most of them are FARGATE Launch types. Thanks in Advance!!

1 Answer
0

Hello,

I found this sample cloudformation template that deploys a web application in an Amazon ECS cluster (EC2 launch type) with autoscaling and an application load balancer.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ecs.html#quickref-ecs-example-1.yaml

Hope this helps!

profile pictureAWS
SUPPORT ENGINEER
answered a year ago
  • The script posted in Documentation did not work for me. I mean it is throwing as soon as I load the template.Thanks .

  • Hello, thanks for writing back. Sorry It didn't work.

    I just used the same template (yaml format) and created a stack in my account and I was able to create the stack successfully. Please check if you missed some formatting while copying the template from the doc to your local machine before the upload.

    If you can provide me with the error that you encountered, maybe we can check why it failed. Thanks!

  • Hello, I verified the syntax and re ran the script, but it failed to create the stack. It is failing to create the service.

    The failed status Reason is : "Resource handler returned message:"Model validation failed(#:extraneous key[DeploymentCircuitBreaker] is not permitted)" (RequestToken:b5505............... , HandleErrorCode:InvalidRequest)

    Due to the service being failed , the ListenerRule and EC2InstanceProfile is not created and the the template is rolled back deleting all the resources.

    Appreciate your help. Thanks.

  • Hello, I verified the syntax and re ran the script, but it failed to create the stack. It is failing to create the service.

    The failed status Reason is : "Resource handler returned message:"Model validation failed(#:extraneous key[DeploymentCircuitBreaker] is not permitted)" (RequestToken:b5505............... , HandleErrorCode:InvalidRequest)

    Due to the service being failed , the ListenerRule and EC2InstanceProfile is not created and the the template is rolled back deleting all the resources.

    Appreciate your help. Thanks.

  • Another Error Which I am getting after creating the template is "ElastisLoadBalacerV2 Load balancer did not stabilize" .

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions