AWS Deployment and Management 3 — Questions and Answers
Question 1: A company wants to deploy an application using a blue/green deployment strategy with zero downtime. Which AWS service best supports this?
- AWS CodeDeploy with Blue/Green deployment type (Correct answer)
- AWS CloudFormation rolling update
- AWS Elastic Beanstalk in-place deployment
- AWS OpsWorks stack deployment
Correct answer: AWS CodeDeploy with Blue/Green deployment type
AWS CodeDeploy's Blue/Green deployment type shifts traffic from the original (blue) environment to a replacement (green) environment with zero downtime.
Question 2: Which AWS CloudFormation feature allows you to preview changes to your stack before executing them?
- Stack Policy
- Change Set (Correct answer)
- Drift Detection
- Stack Instance
Correct answer: Change Set
A CloudFormation Change Set lets you preview how proposed changes will affect your stack resources before applying them.
Question 3: An operations team needs to run commands on a fleet of EC2 instances without SSH access. Which service should they use?
- AWS Config
- AWS Systems Manager Run Command (Correct answer)
- AWS CloudTrail
- AWS Trusted Advisor
Correct answer: AWS Systems Manager Run Command
AWS Systems Manager Run Command allows you to remotely execute commands on EC2 instances without opening inbound ports or managing SSH keys.
Question 4: What is the purpose of an AWS Elastic Beanstalk environment's .ebextensions directory?
- Store application log files for debugging
- Define custom configuration and resource provisioning for the environment (Correct answer)
- Specify IAM roles for the Elastic Beanstalk service
- Configure Auto Scaling policies for EC2 instances
Correct answer: Define custom configuration and resource provisioning for the environment
The .ebextensions directory contains YAML or JSON configuration files that customize and configure the Elastic Beanstalk environment during deployment.
Question 5: A developer wants to ensure that their AWS CloudFormation stack cannot be accidentally deleted. Which feature should they use?
- Stack Policy with deny-delete rule
- Termination Protection (Correct answer)
- Stack Drift Detection
- Resource Import
Correct answer: Termination Protection
CloudFormation Termination Protection prevents a stack from being accidentally deleted, requiring it to be explicitly disabled before deletion is allowed.
Question 6: Which deployment preference type in AWS SAM allows you to gradually shift traffic to a new Lambda function version over time?
- AllAtOnce
- Linear
- Canary (Correct answer)
- BlueGreen
Correct answer: Canary
A Canary deployment shifts a small percentage of traffic to the new version first, then shifts all remaining traffic after a specified interval if no alarms trigger.
Question 7: An engineer needs to store sensitive configuration values like database passwords for use in AWS CodeBuild. What is the recommended approach?
- Hardcode values in the buildspec.yml file
- Store values in AWS Secrets Manager and reference them in the buildspec (Correct answer)
- Pass values as plaintext environment variables in the CodeBuild project
- Store values in an S3 bucket with public read access
Correct answer: Store values in AWS Secrets Manager and reference them in the buildspec
AWS Secrets Manager integrates with CodeBuild, allowing buildspec.yml to reference secrets by name without exposing plaintext values in the project configuration.
A company wants to deploy an application using a blue/green deployment strategy with zero downtime.
Which AWS service best supports this?