DOP-C02 Question 397
Single answerYour company runs a containerized microservices application on Amazon ECS using the Fargate launch type. The application requires that logs be sent to Amazon CloudWatch Logs and that the deployment process be fully automated. Recently, the team noticed that some tasks failed to start during deployments due to misconfigurations in the container definitions. You need to improve the reliability of the deployment process and ensure misconfigurations are identified before deployment. Which solution would best address this issue?
- A
Use AWS CodePipeline with a manual approval action to review container configurations before deployment.
- B
Enable ECS task definition validation in AWS CloudFormation to detect misconfigurations.
- C
Integrate Amazon ECS with AWS Config to ensure compliance checks for container definitions.
- D
Implement task definition validation by using Amazon ECS CLI with the
ecs-cli composecommand.
Show answer and explanation
Correct answer: B
Explanation
To ensure misconfigurations in task definitions are detected before deployment, enabling ECS task definition validation in AWS CloudFormation is the most effective solution. This feature ensures that task definitions are validated for syntax and structural correctness as part of the deployment process. Other options either add unnecessary manual steps, address different use cases, or do not provide validation capabilities.
- A. Incorrect.
Manual approval is not the most efficient or automated method for identifying container misconfigurations, and it adds unnecessary human intervention to the pipeline.
- B. Correct.
AWS CloudFormation provides ECS task definition validation as part of its built-in processing. This ensures that task definitions are syntactically and structurally correct before deployment.
- C. Incorrect.
AWS Config is used for compliance checks and auditing but does not provide real-time validation of ECS task definitions.
- D. Incorrect.
The Amazon ECS CLI's
ecs-cli composecommand is used to convert Docker Compose files into ECS task definitions, but it does not validate the correctness of task definitions against ECS service requirements.