简体   繁体   English

如何在WAF接受原点上添加lambda

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

I have lambda script which access the url.我有访问 url 的 lambda 脚本。

In lambda.在 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.至于https://example.com/ (aws 负载均衡器),有一个 FW 只接受 ipsets 定义的一些 ip。

So, I need to add the rule to this FAW for passing the lambda access.因此,我需要将规则添加到此一汽,以通过 lambda 访问。

Is there any good way to to this?有什么好的方法吗?

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 . 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. NAT 具有static IP ,因此您的 lambda 将使用该 IP 访问 Internet。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM