DVA-C02 Exam QuestionsBrowse all questions from this exam

DVA-C02 Exam - Question 204


A developer is building a serverless application by using the AWS Serverless Application Model (AWS SAM). The developer is currently testing the application in a development environment. When the application is nearly finished, the developer will need to set up additional testing and staging environments for a quality assurance team.

The developer wants to use a feature of the AWS SAM to set up deployments to multiple environments.

Which solution will meet these requirements with the LEAST development effort?

Show Answer
Correct Answer: C

Creating one AWS SAM configuration file with default parameters and updating the testing and staging environments using the --parameter-overrides flag in the AWS SAM CLI involves the least development effort. This method keeps the AWS SAM template consistent and minimizes duplication. It is a straightforward and efficient way to manage multiple environments without the need for additional configuration files or custom scripts.

Discussion

16 comments
Sign in to comment
Jing2023Option: A
Oct 14, 2023

A should be correct reference this stackoverflow post https://stackoverflow.com/questions/68826108/how-to-deploy-to-different-environments-with-aws-sam

NinjaCloud
Nov 1, 2023

Correct Answer: C, You can create a single AWS SAM configuration file with default parameters and then use the --parameter-overrides flag with the AWS SAM CLI to specify parameters that override the defaults for each testing and staging environment. This approach keeps the AWS SAM template file (the infrastructure-as-code) consistent and minimizes duplication. It's a clean and simple way to manage multiple environments without having to create separate templates or custom scripts.

SerialiDrOption: A
Jan 23, 2024

To set up deployments to multiple environments with the least development effort in a serverless application using the AWS Serverless Application Model (AWS SAM), the developer can utilize a configuration file in TOML format with grouped configuration entries for each environment. This approach allows for easy management of different environment configurations and streamlines the deployment process. The specific steps would include: Creating a configuration file in TOML format: This file will include a table for each testing and staging environment, where each table contains the specific configuration for that environment. Using the sam deploy command with the --config-env flag: This flag allows specifying which environment configuration to use for the deployment, corresponding to the tables defined in the configuration file. This solution aligns with Option A:

dillemanOption: A
Oct 11, 2023

A is correct

fordiscussionstwo
Oct 6, 2023

AAAAAAAAAA

TanTran04Option: C
Dec 12, 2023

With at LEAST development effort, Option C is better than A While this approach may work, it introduces additional complexity with the need for a separate configuration file, and it may not be as straightforward as using parameter overrides, as suggested in option C. The use of TOML format might be more suited for certain scenarios, but in the context of AWS SAM, which commonly relies on YAML or JSON configurations, it might be an extra layer of complexity that isn't necessary. Option C, on the other hand, recommends using a single AWS SAM configuration file with default parameters and updating testing and staging environments using the --parameter-overrides flag. This approach is more aligned with typical AWS SAM practices and is simpler and more straightforward than managing multiple configuration files.

Digo30spOption: D
Oct 6, 2023

The correct answer is (D). Using the existing AWS SAM template is the option that requires the LEAST development effort. To configure deployments across multiple environments, you can add additional parameters to your AWS SAM template to configure specific attributes for the serverless function and database table resources that are in each environment.

PrakashM14Option: C
Oct 20, 2023

Options A and B introduce additional complexities such as configuration files in TOML format or writing custom shell scripts. These might require more effort and maintenance. Option D involves adding additional parameters to the existing AWS SAM template, which can work but may lead to a more complex and less maintainable template as the number of environments grows. Therefore, option C is a straightforward and efficient solution for deploying to multiple environments with AWS SAM.

Rameez1Option: C
Oct 20, 2023

Here all the options can do the Job but option C does it with least effort.

Hanny
Dec 12, 2023

C. Create one AWS SAM configuration file that has default parameters. Perform updates to the testing and staging environments by using the --parameter-overrides flag in the AWS SAM CLI and the parameters that the updates will override.

KarBiswaOption: A
Mar 2, 2024

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html

41eb566Option: C
Mar 19, 2024

C. Create one AWS SAM configuration file that has default parameters. Perform updates to the testing and staging environments by using the --parameter-overrides flag in the AWS SAM CLI and the parameters that the updates will override.

TanTran04
Dec 12, 2023

With at LEAST development effort, Option C is better than A While this approach may work, it introduces additional complexity with the need for a separate configuration file, and it may not be as straightforward as using parameter overrides, as suggested in option C. The use of TOML format might be more suited for certain scenarios, but in the context of AWS SAM, which commonly relies on YAML or JSON configurations, it might be an extra layer of complexity that isn't necessary. Option C, on the other hand, recommends using a single AWS SAM configuration file with default parameters and updating testing and staging environments using the --parameter-overrides flag. This approach is more aligned with typical AWS SAM practices and is simpler and more straightforward than managing multiple configuration files.

Certified101Option: C
Dec 16, 2023

C with least development overhead

65703c1Option: C
May 23, 2024

C is the correct answer.

AnandeshOption: C
Jul 9, 2024

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html#serverless-sam-cli-config-default