4.3.1. Sample Questions - Domain 1: SDLC Automation
Question 1:
A development team is using AWS CodePipeline to automate their CI/CD process. They need to ensure that every code change is automatically built, tested, and deployed to a staging environment. Which combination of AWS services should be integrated into CodePipeline to achieve this, adhering to DevOps best practices for automation and feedback?
A) AWS CodeCommit, AWS CodeBuild, AWS CodeDeploy B) Amazon S3, AWS Lambda, Amazon EC2 C) AWS CloudFormation, AWS Systems Manager, Amazon DynamoDB D) Amazon SQS, AWS Step Functions, Amazon SNS
Correct Answer: A
Explanation:
- A) AWS CodeCommit, AWS CodeBuild, AWS CodeDeploy: This combination represents the core services for a robust CI/CD pipeline on AWS. CodeCommit provides version control for source code, CodeBuild compiles code and runs tests, and CodeDeploy automates deployments to various compute services. This aligns with the First Principle of Automation across the SDLC.
Question 2:
A DevOps engineer needs to implement a strategy to minimize downtime during application deployments to an Amazon EC2 Auto Scaling group. The solution must allow for quick rollback in case of issues and ensure that the new version is thoroughly tested before fully replacing the old one. Which deployment strategy best meets these requirements?
A) In-place deployment B) Blue/Green deployment C) Rolling update D) All-at-once deployment
Correct Answer: B
Explanation:
- B) Blue/Green deployment: This strategy involves deploying the new application version (Green environment) alongside the current production version (Blue environment). Traffic is then shifted to the Green environment. If issues arise, traffic can be quickly reverted to the Blue environment, minimizing downtime and enabling rapid rollback. This aligns with the First Principle of High Availability and Rapid Recovery.
