DVA-C02 exam dumps

DVA-C02 practice question 213 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 213

Single answer

You are developing a serverless application using AWS Lambda and need to deploy the function to multiple environments (e.g., development, staging, production). Each environment requires different configuration values such as database connection strings and API endpoints. What is the best way to deploy your Lambda function while managing these environment-specific configurations?

  1. A

    Use AWS CloudFormation with Parameters and separate stacks for each environment.

  2. B

    Manually edit the Lambda function's code to include the correct configurations for each environment before deployment.

  3. C

    Use AWS Elastic Beanstalk to manage the Lambda environments and configurations.

  4. D

    Store environment-specific configurations in AWS Systems Manager Parameter Store or AWS Secrets Manager and reference them in the Lambda function.

Show answer and explanation

Correct answer: A

Explanation

To deploy a Lambda function to multiple environments while managing configuration values, AWS CloudFormation with Parameters is the best approach. It allows you to define environment-specific configurations in a parameterized and repeatable way, making it easy to maintain multiple environments. While AWS Systems Manager Parameter Store or AWS Secrets Manager can securely store configuration values, they are not a standalone solution for deployment. Automation and scalability are key to managing deployments effectively.

  • A. Correct.

    Correct. Using AWS CloudFormation with Parameters and separate stacks for each environment allows you to manage deployments efficiently and maintain environment-specific configurations in an automated and scalable way.

  • B. Incorrect.

    Incorrect. Manually editing the Lambda code for each environment is error-prone, not scalable, and goes against best practices for deployment automation.

  • C. Incorrect.

    Incorrect. AWS Elastic Beanstalk is not designed for managing AWS Lambda deployments. It is primarily used for deploying and managing web applications and services.

  • D. Incorrect.

    Incorrect. While storing configurations in AWS Systems Manager Parameter Store or AWS Secrets Manager is a good practice, it does not fully address the deployment process for managing multiple environments. Combining this with AWS CloudFormation is a more complete solution.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam