AWS - LambdaYou want to securely store a database password in a Lambda environment variable but avoid exposing it in plain text. Which approach is best practice?AUse AWS Lambda environment variables with encryption enabled and grant decryption permissionsBHardcode the password directly in the Lambda function codeCStore the password in a public S3 bucket and read it at runtimeDSend the password as a query parameter in API requestsCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand secure storage optionsLambda environment variables support encryption with AWS KMS and access control.Step 2: Evaluate other optionsHardcoding, public S3, or sending passwords in query parameters expose secrets and are insecure.Final Answer:Use AWS Lambda environment variables with encryption enabled and grant decryption permissions -> Option AQuick Check:Encrypted env vars + permissions = secure secret storage [OK]Quick Trick: Encrypt env vars and control access for secrets [OK]Common Mistakes:Hardcoding secrets in codeUsing public storage for passwordsExposing secrets in API requests
Master "Lambda" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes API Gateway - Why API Gateway matters - Quiz 11easy API Gateway - API deployment and stages - Quiz 1easy DynamoDB - Tables, items, and attributes - Quiz 2easy Elastic Load Balancing - Network Load Balancer (NLB) - Quiz 4medium Elastic Load Balancing - Cross-zone load balancing - Quiz 12easy Elastic Load Balancing - Listener rules and routing - Quiz 5medium Elastic Load Balancing - Listener rules and routing - Quiz 2easy Elastic Load Balancing - Network Load Balancer (NLB) - Quiz 10hard RDS and Relational Databases - RDS supported engines - Quiz 10hard RDS and Relational Databases - RDS backup and snapshots - Quiz 10hard