Add an ECS deploy stage, output imagedefinitions.json, and run connectivity checks from a Lambda action stage
A DevOps engineer needs to implement integration tests into an existing AWS CodePipeline CI/CD workflow for an Amazon Elastic Container Service (Amazon ECS) service. The CI/CD workflow retrieves new application code from an AWS CodeCommit repository and builds a container image. The Cl/CD workflow then uploads the container image to Amazon Elastic Container Registry (Amazon ECR) with a new image tag version. The integration tests must ensure that new versions of the service endpoint are reachable and that various API methods return successful response data. The DevOps engineer has already created an ECS cluster to test the service. Which combination of steps will meet these requirements with the LEAST management overhead? (Choose three.)
Community Votes
100% of anonymous learners picked answer ADE. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The least-management-overhead path uses only pipeline-native constructs: an ECS deploy stage rather than a CodeDeploy deploy stage, since CodeDeploy would add blue/green or traffic-shifting configuration that an ECS deploy does not need and therefore more management (A over B). The build stage must produce imagedefinitions.json referencing the new tag because that is how the ECS deploy action determines which image to deploy (D). The tests themselves run as a Lambda action stage invoking a function that performs the connectivity and API checks directly against the service, avoiding any separate test framework (E).
The integration tests must confirm that the new service endpoint is reachable and that API methods return successful responses, and this must be done with the least management overhead. The image build stage is updated to output an imagedefinitions.json file referencing the new image tag so the deployment stage knows which image to use, a deploy stage is added with Amazon ECS as the action provider to roll out the new service version, and an AWS Lambda function performing connectivity checks and API calls is integrated as a Lambda action stage so the tests run automatically as part of the pipeline without any external test harness.
Configuring AWS CodeDeploy as the action provider for the deploy stage (B) — CodeDeploy brings its own deployment configuration, deployment groups, and appspec.yml requirements, which is additional management overhead compared with deploying directly through the ECS action provider; the requirement explicitly asks for the least management overhead. Omitting the imagedefinitions.json output from the image build stage (D) — without that file the ECS deploy action has no reference to the new image tag and cannot know which image version to deploy, so the pipeline breaks. Adding an appspec.yml file to the CodeCommit repository (C) — appspec.yml is a CodeDeploy artifact, and since the deploy stage uses the ECS action provider rather than CodeDeploy, it would be unused configuration.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Three additions to the existing pipeline satisfy the requirements with the least management overhead. First, the image build stage is updated to output an imagedefinitions.json file that references the new image tag, because that file is how a pipeline conveys the image version to the deployment action; without it the deploy stage would not know which image to roll out (D). Second, a deploy stage is added with Amazon ECS as the action provider, which deploys the new service revision to the existing ECS cluster with no additional deployment configuration, keeping management minimal compared with introducing CodeDeploy (A). Third, an AWS Lambda function that runs connectivity checks and API calls against the service is integrated as a Lambda action stage, so the integration tests execute automatically as part of the pipeline with no separate test framework or infrastructure to run and maintain (E). A, D, and E are the correct combination.Why the Other Options Are Wrong
B adds a deploy stage with AWS CodeDeploy as the action provider. CodeDeploy requires additional artifacts and configuration, including an appspec.yml file, a deployment group, and a deployment configuration governing traffic shifting; none of that is needed to roll out a new ECS service revision, so using CodeDeploy adds management overhead that the requirement explicitly asks to avoid. jamesf identified the ECS action provider as the direct route that ensures the service is updated. C adds an appspec.yml file to the CodeCommit repository. appspec.yml is the artifact CodeDeploy reads for its lifecycle hooks and file mappings; because the deploy stage uses the ECS action provider rather than CodeDeploy, that file would never be consumed, so it is unused configuration. The omission of the imagedefinitions.json output, addressed by option D, would leave the ECS deploy action without the new image tag. A, D, and E are correct.Community Comment Notes
Community voted A,D,E unanimously. xdkonorek2 cited the CodePipeline documentation page for an ECS continuous deployment pipeline, which matches the three steps. jamesf highlighted the keyword least management overhead and explained that configuring ECS as the action provider deploys the container image to ECS and ensures the service is updated. youonebe confirmed A,D,E without further qualification. No alternative received support.Official Reference
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →