exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 65 discussion

A developer is building a new application on AWS. The application uses an AWS Lambda function that retrieves information from an Amazon DynamoDB table. The developer hard coded the DynamoDB table name into the Lambda function code. The table name might change over time. The developer does not want to modify the Lambda code if the table name changes.
Which solution will meet these requirements MOST efficiently?

  • A. Create a Lambda environment variable to store the table name. Use the standard method for the programming language to retrieve the variable.
  • B. Store the table name in a file. Store the file in the /tmp folder. Use the SDK for the programming language to retrieve the table name.
  • C. Create a file to store the table name. Zip the file and upload the file to the Lambda layer. Use the SDK for the programming language to retrieve the table name.
  • D. Create a global variable that is outside the handler in the Lambda function to store the table name.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Dun6
Highly Voted 1 year, 7 months ago
Selected Answer: A
You need to use environment variables
upvoted 9 times
...
Untamables
Highly Voted 1 year, 7 months ago
Selected Answer: A
A https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
upvoted 7 times
...
sumanshu
Most Recent 4 months ago
Selected Answer: A
Environment variables are a built-in feature of AWS Lambda
upvoted 1 times
...
65703c1
5 months, 1 week ago
Selected Answer: A
A is the correct answer.
upvoted 1 times
...
mma34
11 months, 1 week ago
Selected Answer: A
Why are some answers wrong on here?
upvoted 1 times
...
eberhe900
1 year, 3 months ago
Selected Answer: A
You can use environment variables to adjust your function's behavior without updating code. An environment variable is a pair of strings that is stored in a function's version-specific configuration. The Lambda runtime makes environment variables available to your code and sets additional environment variables that contain information about the function and invocation request.
upvoted 2 times
...
gpt_test
1 year, 6 months ago
Selected Answer: A
Explanation: Using Lambda environment variables allows you to store configuration information separate from your code, which makes it easy to update the table name without changing the Lambda function code. AWS Lambda provides built-in support for environment variables, making it the most efficient solution.
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago