Q1 — Lambda VPC access
A Lambda function needs to query an RDS database in a private subnet within a VPC. By default, the Lambda function cannot reach the database. What must be configured?
- A. Attach an IAM role to the Lambda function with RDS permissions
- B. Place the Lambda function inside the VPC by configuring it with the appropriate subnets and security groups
- C. Add an internet gateway to the private subnet
- D. Enable VPC peering between the Lambda default network and the application VPC
- Correct answer:
Q2 — SQS visibility timeout
A Lambda function processes messages from an SQS queue. Processing each message takes 45 seconds on average. After processing, the Lambda deletes the message. However, some messages are being processed twice. What is the most likely cause and fix?
- A. The SQS FIFO queue is not configured correctly; switch to Standard queue
- B. The visibility timeout is shorter than the processing time; increase it to at least 45 seconds (plus buffer)
- C. Lambda is running out of concurrency; increase reserved concurrency
- D. The Lambda timeout is too long; reduce it to 30 seconds
- Correct answer:
Q3 — SQS Standard vs FIFO
An online banking application processes fund transfers. Each transfer must be processed exactly once and in the order it was submitted. Which SQS queue type is required?
- A. Standard queue for maximum throughput
- B. FIFO queue for strict ordering and exactly-once processing