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
You can either configure a NAT gateway for the VPC or define a VPC endpoint.
NAT gateways are cheaper because multiple endpoints are expensive.
© 2024 OneMinuteCode. All rights reserved.