How to Create an Automated CI/CD Pipeline with AWS Copilot and CodeCommit?
Short answer
C Use the AWS Copilot CLI to define the AWS Copilot pipeline and to deploy the AWS CodePipeline. Select CodeCommit as the source for the AWS CodePipeline.
Question
A developer is building a new containerized application by using AWS Copilot. The developer uses the AWS Copilot command line interface (CLI) to deploy the application during development. The developer committed the application code to a new AWS CodeCommit repository. The developer must create an automated deployment process before releasing the new application to production. What should the developer do to meet these requirements in the MOST operationally efficient way?
Key Takeaways
This question tests knowledge of AWS Copilot's native pipeline capabilities, emphasizing operational efficiency over manual configuration.
AWS Copilot provides a built-in copilot pipeline init command to generate and deploy a CI/CD pipeline using AWS CodePipeline. This is the most operationally efficient approach compared to manually writing buildspec files or using third-party tools like SAM.
Common mistake: Many candidates choose Option A because it appears functional, but it requires manually creating a buildspec and pipeline configuration, which is less efficient than Copilot's native pipeline feature.
Expert Analysis
Why Option C is Correct
Option C leverages the AWS Copilot CLI's native pipeline functionality. The copilot pipeline init command automatically generates a buildspec.yml and a pipeline.yml (CloudFormation template) that defines an AWS CodePipeline with the correct stages (Source, Build, Deploy). Copilot then deploys this pipeline for you. This approach is the most operationally efficient because:
- It requires zero manual configuration of CodePipeline or buildspec files.
- Copilot natively understands the application's environment structure and configures the pipeline accordingly.
- It fully integrates with the Copilot workflow, reducing the chance of misconfiguration.
Why Other Options Are Incorrect
Option A works but is not the most operationally efficient. It requires the developer to manually write a buildspec.yml that invokes Copilot commands and then separately create a CodePipeline using Copilot. This introduces unnecessary manual steps and potential for errors.
Option B incorrectly introduces AWS SAM CLI, which is designed for serverless applications (Lambda, API Gateway), not containerized applications deployed via Copilot. Mixing SAM with Copilot adds complexity and is not a supported or efficient workflow.
Option D requires manually defining a CloudFormation template and configuring it as a Copilot add-on. This is unnecessarily complex and defeats the purpose of using Copilot to simplify deployment and pipeline management.
Key Takeaway
AWS Copilot is designed to abstract away the complexity of container orchestration and CI/CD. When the question asks for the MOST operationally efficient approach, always look for the option that leverages Copilot's built-in, native features rather than manual or hybrid configurations.
Official Reference
Exam Strategy
When a question emphasizes 'MOST operationally efficient,' prioritize native, built-in features of the service in question over manual or third-party configurations. AWS Copilot's pipeline command is purpose-built for this scenario.
Community Votes
67% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 8 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded.
From public community threads 8
-
DeaconStJohn 👍 2 Answered Chttps://ecsworkshop.com/microservices/frontend/#deploy-frontend-0:~:text=on%20the%20pipeline.-,Creating%20the%20pipeline,-Generally%2C%20when%20we This workshop is linked from AWS docs @ https://docs.aws.amazon.com/AmazonECS/latest/developerguide/getting-started-aws-copilot-cli.html#:~:text=Step%206.%20Learn%20to%20create%20a%20CI/CD%20Pipeline Co-pilot CLI is a substitute for AWS console. As the question states the dev is using co-pilot I think this is the best answer, although option A is more suited to my experience.
-
preachr 👍 2 Answered Chttps://aws.github.io/copilot-cli/docs/concepts/pipelines/
-
komorebi 👍 2 Answered AThe correct answer to ChetGPT is A
-
examuserss 👍 1 Answered CCorrect Answer: C. Use the AWS Copilot CLI to define the AWS Copilot pipeline and to deploy the AWS CodePipeline. Select CodeCommit as the source for the AWS CodePipeline. This option is the most operationally efficient solution, as it makes full use of AWS Copilot's built-in capabilities to define and deploy the automated pipeline with minimal effort.
-
wh1t4k3r 👍 1 Answered CBoth A and C work, the key word is efficiency. C is the most efficient way.
Show 3 more comments
-
65703c1 👍 2 Answered AA is the correct answer.
-
a1971h 👍 1 Answered CC ,,,,,,,,,,,,,,,,,,,
-
Lucky4Life 👍 1 Answered CPer Chatgpt
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →