Recall & Review
beginner
What are environment variables in AWS Lambda?
Environment variables in AWS Lambda are key-value pairs that you can set to store configuration settings. They help your function access settings without hardcoding them in the code.
Click to reveal answer
beginner
How do environment variables improve Lambda function management?
They let you change settings like database URLs or API keys without changing the code. This makes your function easier to update and more secure.Click to reveal answer
intermediate
Can environment variables in Lambda be encrypted? If yes, how?
Yes, Lambda supports encrypting environment variables using AWS Key Management Service (KMS). This keeps sensitive data like passwords safe.
Click to reveal answer
beginner
How can you access environment variables inside a Lambda function?
Inside your Lambda code, you can read environment variables using standard methods. For example, in Node.js, use process.env.VARIABLE_NAME.
Click to reveal answer
intermediate
What is a best practice when using environment variables in Lambda?
Avoid putting sensitive data directly in environment variables unless encrypted. Use AWS KMS encryption and restrict access with IAM roles.
Click to reveal answer
What is the main purpose of environment variables in AWS Lambda?
✗ Incorrect
Environment variables store configuration settings separately from code, making it easier to manage and update.
How can you secure sensitive environment variables in Lambda?
✗ Incorrect
AWS KMS encryption protects sensitive environment variables from unauthorized access.
Which of the following is a correct way to access an environment variable named 'API_KEY' in Node.js Lambda code?
✗ Incorrect
In Node.js, environment variables are accessed using process.env.VARIABLE_NAME.
What happens if you update an environment variable in Lambda?
✗ Incorrect
Updated environment variables take effect on the next invocation of the Lambda function.
Which AWS service is used to encrypt Lambda environment variables?
✗ Incorrect
AWS KMS is the service used to encrypt and manage keys for Lambda environment variables.
Explain what environment variables are in AWS Lambda and why they are useful.
Think about how you might keep your app settings outside the code.
You got /5 concepts.
Describe how to securely manage sensitive data using environment variables in Lambda.
Focus on encryption and access control.
You got /4 concepts.