Skip to content

Allow Lambda Function connect to On Prem Db via Site to Site VPN Connection

0

I have a Lambda function running in private subnets within a VPC that needs to connect to an on-premises MySQL database over a VPN Site-to-Site connection. The on-premises firewall only allows connections from specific IP addresses, but Lambda functions have dynamic IPs. How can I configure my setup so that the Lambda functions can reliably connect to the database?

1 Answer
1

Hello.

I think you can make the private IP address static by connecting Lambda to a VPC and communicating through a private NAT Gateway.
An overview is provided in the following document:
https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-scenarios.html#private-nat-allowed-range

EXPERT

answered 8 months ago

AWS
EXPERT

reviewed 7 months ago

  • Thank you very much. I set up everything, but for a reason my Lambdas don't seem to have ENIs even when I attach them to a VPC. I don't know if that is why the Setup still doesn't work

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.