AWS Certified DevOps Engineer – Professional — Question 204

A DevOps engineer wants to deploy a serverless web application that is based on AWS Lambda. The deployment must meet the following requirements:
✑ Provide staging and production environments.
✑ Restrict developers from accessing the production environment.
✑ Avoid hardcoding passwords in the Lambda functions.
✑ Store source code in AWS CodeCommit.
✑ Use AWS CodePipeline to automate the deployment.
What is the MOST operationally efficient solution that meets these requirements?

Answer options

Correct answer: B

Explanation

Option B is the correct choice as it allows for the creation of separate accounts for staging and production, thus ensuring security and access restrictions, while using Lambda environment variables avoids hardcoding sensitive information. The other options either propose using AWS KMS, which adds unnecessary complexity, or do not utilize Lambda environment variables, failing to meet the requirement of avoiding hardcoded passwords effectively.