AWS - LambdaYou have a Lambda function that needs to access a private database inside a VPC. What must you configure to allow this access?AAttach the Lambda function to the VPC with proper subnet and security groupBEnable public internet access for the Lambda functionCCreate an IAM role with S3 accessDUse AWS CloudFront to route trafficCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand Lambda access to VPC resourcesLambda must be configured to run inside the VPC with correct subnet and security group.Step 2: Evaluate other optionsPublic internet access is insecure; IAM role with S3 access is unrelated; CloudFront is for content delivery.Final Answer:Attach the Lambda function to the VPC with proper subnet and security group -> Option AQuick Check:Lambda in VPC with subnet/security group = DB access [OK]Quick Trick: Configure Lambda inside VPC with subnet and security group [OK]Common Mistakes:MISTAKESAssuming public internet access solves private DB accessConfusing IAM roles with network accessUsing CloudFront incorrectly for database access
Master "Lambda" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes API Gateway - API Gateway throttling - Quiz 7medium API Gateway - API deployment and stages - Quiz 4medium Auto Scaling - Scaling policies (target tracking, step, simple) - Quiz 7medium Auto Scaling - Minimum, maximum, and desired capacity - Quiz 1easy CloudWatch - Log groups and log streams - Quiz 3easy CloudWatch - CloudWatch Events (EventBridge) - Quiz 13medium Elastic Load Balancing - Cross-zone load balancing - Quiz 6medium Elastic Load Balancing - Target groups concept - Quiz 1easy RDS and Relational Databases - Read replicas for performance - Quiz 1easy RDS and Relational Databases - RDS security (encryption, security groups) - Quiz 3easy