Unable to add message to SQS when configuring VPC in lambda

Asked 2 years ago, Updated 2 years ago, 107 views

I'm trying to set up VPC in lambda, get the required value from RDS, and send a message to SQS, but lambda times out with the following message.

We are available to display results and logs for invocations that take longer than 60 seconds.You can view the results and logs for the function in CloudWatch once the function accomplishments executing.

If you remove the VPC, the value will be added to the SQS successfully

Also, I thought it might be possible to send it to SQS via SNS, but I couldn't add it because of the same phenomenon. I was able to push it to SNS when I removed the VPC.

aws aws-lambda

2022-09-30 15:05

1 Answers

You can either configure a NAT gateway for the VPC or define a VPC endpoint.
NAT gateways are cheaper because multiple endpoints are expensive.


2022-09-30 15:05

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.