what ip AWS lambda function use?

后端 未结 2 1186
悲&欢浪女
悲&欢浪女 2021-02-05 19:57

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 n

2条回答
  •  清酒与你
    2021-02-05 20:06

    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.

    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.:

    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.

    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.

提交回复
热议问题