Bird
0
0

Which of the following is the correct way to define an environment variable named API_KEY with value 12345 in AWS Lambda console?

easy📝 Configuration Q12 of 15
AWS - Lambda
Which of the following is the correct way to define an environment variable named API_KEY with value 12345 in AWS Lambda console?
ACreate a CloudWatch alarm named <code>API_KEY</code> with threshold 12345
BAdd a tag with key <code>API_KEY</code> and value <code>12345</code>
CWrite <code>export API_KEY=12345</code> in the Lambda function code
DSet key as <code>API_KEY</code> and value as <code>12345</code> in the Environment Variables section
Step-by-Step Solution
Solution:
  1. Step 1: Identify environment variable setup

    Environment variables are set as key-value pairs in the Lambda console's Environment Variables section.
  2. Step 2: Eliminate incorrect options

    Tags, code exports, and CloudWatch alarms do not define environment variables.
  3. Final Answer:

    Set key as API_KEY and value as 12345 in the Environment Variables section -> Option D
  4. Quick Check:

    Environment variables = key-value pairs in Lambda console [OK]
Quick Trick: Set env vars in Lambda console's Environment Variables section [OK]
Common Mistakes:
  • Confusing tags with environment variables
  • Trying to set env vars inside code with export
  • Using unrelated AWS features like CloudWatch alarms

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes