Q91 — AWS DOP-C02 Ch.2
Question 91 of 100 | ← Chapter 2
A DevOps engineer wants to deploy a serverless web application based on AWS Lambda. The deployment must meet the following requirements: • Provide staging and production environments. • Restrict developer access to the production environment. • Avoid hardcoding credentials in Lambda functions. • Store source code in AWS CodeCommit. • Automate deployment using AWS CodePipeline.
- A. Create separate staging and production accounts to isolate deployment targets. Use AWS Key Management Service (AWS KMS) to store environment-specific values. Use CodePipeline with AWS CodeDeploy to automate deployment.
- B. Create separate staging and production accounts to isolate deployment targets. Use Lambda environment variables to store environment-specific values. Use CodePipeline with AWS CodeDeploy to automate deployment. ✓
- C. Define tagging conventions for staging and production environments to separate deployment targets. Use AWS Key Management Service (AWS KMS) to store environment-specific values. Use CodePipeline with AWS CodeDeploy to automate deployment.
- D. Define tagging conventions for staging and production environments to separate deployment targets. Use Lambda environment variables to store environment-specific values. Use CodePipeline with AWS CodeDeploy to automate deployment.
Correct Answer: B. Create separate staging and production accounts to isolate deployment targets. Use Lambda environment variables to store environment-specific values. Use CodePipeline with AWS CodeDeploy to automate deployment.
Explanation
You cannot use tags to separate Lambda deployment targets. AWS CodeDeploy documentation explicitly states that tagging applies to EC2 instances and on-premises servers, not Lambda functions: https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html