PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, November 4, 2022

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

 November 04, 2022     amazon-waf, amazon-web-services, aws-lambda, lambda     No comments   

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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

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

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing