I have a lambda function that makes requests to external API which requires a static IP to whitelist. I have created a VPC with an assigned elastic IP to solve this.
The function works perfectly when testing on the AWS Lambda console but if triggered using EventBridge (CloudWatch Events), it always times out:
2020-10-01T11:12:29.219Z 012df4ee-bb1e-4821-b1a2-6c3396ca760b Task timed out after 720.00 seconds
I thought the issue was the VPC, but considering this works when I manually trigger it I think there may be an issue with how the function is being triggered by cloudwatch.
Has anyone had the problem before?
It is not possible to assign an Elastic IP address to an AWS Lambda function.
Instead:
The Lambda function will then access the Internet via the NAT Gateway/NAT Instance, using the assigned Elastic IP address.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.