DevOps Engineering on AWS Certification CI/CD Pipelines on AWS 2 — Questions and Answers
Question 1: Which CodeDeploy deployment configuration deploys to one instance at a time, stopping if any instance fails?
- CodeDeployDefault.OneAtATime (Correct answer)
- CodeDeployDefault.AllAtOnce
- CodeDeployDefault.HalfAtATime
- CodeDeployDefault.Linear10PercentEvery1Minutes
Correct answer: CodeDeployDefault.OneAtATime
CodeDeployDefault.OneAtATime deploys to one instance at a time and stops the deployment if any instance fails, minimizing risk.
Question 2: In AWS CodePipeline, which source provider allows you to trigger a pipeline from an Amazon ECR image push?
- Amazon ECR (Correct answer)
- AWS CodeCommit
- Amazon S3
- GitHub
Correct answer: Amazon ECR
Amazon ECR is a supported source provider in CodePipeline, enabling pipelines to trigger automatically when a new container image is pushed.
Question 3: What does the appspec.yml file control in an AWS CodeDeploy deployment?
- How CodeDeploy maps source files to destinations and lifecycle event hooks (Correct answer)
- How CodeBuild compiles source code
- How CodePipeline stages are ordered
- How CloudFormation stacks are deployed
Correct answer: How CodeDeploy maps source files to destinations and lifecycle event hooks
The appspec.yml file specifies file mappings and lifecycle event hooks that CodeDeploy uses during a deployment.
Question 4: Which feature of AWS CodeBuild allows you to cache dependencies to speed up future builds?
- Build caching (Correct answer)
- Build artifacts
- Build batches
- Build triggers
Correct answer: Build caching
CodeBuild's build caching stores reusable build components such as dependencies in S3 or locally, reducing build times for subsequent runs.
Question 5: Which AWS service can be used as a source stage in CodePipeline to store and version Git repositories?
- AWS CodeCommit (Correct answer)
- AWS CodeArtifact
- Amazon S3
- Amazon ECR
Correct answer: AWS CodeCommit
AWS CodeCommit is a fully managed source control service that hosts secure Git-based repositories and integrates as a CodePipeline source.
Question 6: Which CodePipeline action type allows you to invoke an AWS Lambda function as part of the pipeline?
- Invoke (Correct answer)
- Deploy
- Test
- Approval
Correct answer: Invoke
The Invoke action type in CodePipeline lets you call a Lambda function to perform custom processing within the pipeline.
Which CodeDeploy deployment configuration deploys to one instance at a time, stopping if any instance fails?