Friday, November 4, 2022

[FIXED] How to add the lambda on WAF accept origin

Issue

I have lambda script which access the url.

In lambda.

url = "https://example.com"
req =  request.Request(url, data={})
res = request.urlopen(req)

As for, https://example.com/ (aws load balancer), there is a FW which accept only some ips defined by ipsets.

So, I need to add the rule to this FAW for passing the lambda access.

Is there any good way to to this?


Solution

If you want static IP for your lambda function for the outgoing internet traffic, you have to place your lambda in a VPC, in a private subnet and setup NAT gateway. NATs have static IPs so your lambda will use that IP to access the internet.



Answered By - Marcin
Answer Checked By - Willingham (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.