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?
A) Reference the EC2 instances in the AWS::ECS::Cluster resource and reference the ECS cluster in the AWS::ECS::Service resource.
B) Reference the ECS cluster in the AWS::AutoScaling::LaunchConfiguration resource of the UserData property.
C) Reference the ECS cluster in the AWS::EC2::Instance resource of the UserData property.
D) Reference the ECS cluster in the AWS::CloudFormation::CustomResource resource to trigger an AWS Lambda function that registers the EC2 instances with the appropriate ECS cluster.
Correct Answer:
Verified
Q151: A company has a mission-critical application on
Q152: An application that runs on Amazon EC2
Q153: A company indexes all of its Amazon
Q154: An application runs on Amazon EC2 instances
Q155: A DevOps team wants to be able
Q157: A company has containerized all of its
Q158: A DevOps Engineer is tasked with migrating
Q159: An ecommerce company is looking for ways
Q160: A company's popular global web application is
Q161: A company has developed an AWS Lambda
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents