什么IP AWS lambda函数使用? [英] what ip AWS lambda function use?

查看:97
本文介绍了什么IP AWS lambda函数使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对网络不是很好,但是这是我的问题:我需要从位于防火墙后面的AWS lambda函数连接到MySQL服务器,并且要白化"我的AWS lambda,我需要知道它的IP用途.

I'm not very good with networking, but here is my issue: I need to connect to MySQL server from AWS lambda function, that is behind firewall, and to 'white' my AWS lambda i need to know what IP it uses.

据我了解,它取决于VPC子网.是对的,如果我的VPC子网CIDR为172.31.16.0/20,则IP可能从172.31.16.0到172.31.16.254?

As i understand, it varies depending on VPC subnet. Is it right, that if my VPC subnet CIDR is 172.31.16.0/20, IP may vary from 172.31.16.0 to 172.31.16.254 ?

推荐答案

您拥有不在AWS基础设施上的MySQL实例.您想通过Lambda函数的IP将对MySQL实例的访问限制为本地实例.您只能使用本地防火墙来保护实例.

You have an MySQL instance that is not on AWS infrastructure. You want to limit access to the the MySQL instance by the IP of the Lambda function to your on-premise instance. You can only use a local firewall to secure the instance.

由于您的用例需要从Lambda到公共Internet上的MySQL实例的Internet访问,因此您需要配置

Since your use case requires internet access from Lambda to your MySQL instance on the public internet, you will need to configure a NAT gateway for your Lambda function to access the internet.:

如果您的Lambda功能需要Internet访问...,则可以在VPC内配置NAT实例,也可以 使用Amazon VPC NAT网关.有关更多信息,请参见NAT网关. 在《 Amazon VPC用户指南》中.

if your Lambda function requires Internet access..., you can configure a NAT instance inside your VPC or you can use the Amazon VPC NAT gateway. For more information, see NAT Gateways in the Amazon VPC User Guide.

使用NAT网关配置,您的Lambda请求可以来自NAT网关的固定IP.如果在此处为NAT网关分配和弹性IP号,则可以在防火墙上指定该IP/端口组合,以确保对本地SQL实例的访问安全.

Using a NAT Gateway configuration allows your Lambda requests to come from the fixed IP of the NAT Gateway. If you assign and Elastic IP Number to the NAT Gateway here, you can then specify that IP/port combination on your firewall to secure access to your on-premise SQL instance.

这篇关于什么IP AWS lambda函数使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆