DOP-C02 · Question #198
A DevOps engineer is setting up a container-based architecture. The engineer has decided to use AWS CloudFormation to automatically provision an Amazon ECS cluster and an Amazon EC2 Auto Scaling…
The correct answer is B. Reference the ECS cluster in the AWS::AutoScaling::LaunchConfiguration resource of the. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling- launchconfiguration.html#aws-resource-autoscaling-launchconfiguration--examples
Question
A DevOps engineer is setting up a container-based architecture. The engineer has decided to use AWS CloudFormation to automatically provision an Amazon ECS cluster and an Amazon EC2 Auto Scaling group to launch the EC2 container instances. After successfully creating the CloudFormation stack, the engineer noticed that, even though the ECS cluster and the EC2 instances were created successfully and the stack finished the creation, the EC2 instances were associating with a different cluster. How should the DevOps engineer update the CloudFormation template to resolve this issue?
Options
- AReference the EC2 instances in the AWS::ECS::Cluster resource and reference the ECS cluster
- BReference the ECS cluster in the AWS::AutoScaling::LaunchConfiguration resource of the
- CReference the ECS cluster in the AWS::EC2::Instance resource of the UserData property.
- DReference the ECS cluster in the AWS::CloudFormation::CustomResource resource to trigger an
How the community answered
(43 responses)- A9% (4)
- B70% (30)
- C16% (7)
- D5% (2)
Explanation
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling- launchconfiguration.html#aws-resource-autoscaling-launchconfiguration--examples
Topics
Community Discussion
No community discussion yet for this question.