How to Create an Automated CI/CD Pipeline with AWS Copilot and CodeCommit?
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?
Community Votes
67% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
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.
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.
Community Discussion (8 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
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.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →