AWS Certified SysOps Administrator – Associate (SOA-C03) — Question 57

A company deploys AWS infrastructure in a VPC that has an internet gateway. The VPC has public subnets and private subnets. An Amazon RDS for MySQL DB instance is deployed in a private subnet. An AWS Lambda function uses the same private subnet and connects to the DB instance to query data.
A developer modifies the Lambda function to require the function to publish messages to an Amazon Simple Queue Service (Amazon SQS) queue. After these changes, the Lambda function times out when it tries to publish messages to the SQS queue.
Which solutions will resolve this issue? (Choose two.)

Answer options

Correct answer: C, D

Explanation

The correct answers are C and D. Option C resolves the timeout issue by allowing the Lambda function in the private subnet to access the internet for SQS communication through the NAT gateway. Option D provides a direct connection to SQS from the VPC, which is necessary for the Lambda function to successfully send messages. Options A and B do not address the issue correctly, as A removes necessary VPC connectivity and B does not directly solve the SQS access problem.