Skip to content

Lambda with a Fixed Elastic IP that goes via a Site to Site VPN to a Partner

0

I have setup a Lambda and linked it to a VPC with a NAT Gateway that has a fixed public Elastic IP and linked it to a Site to Site VPN (Through a Transit Gateway). The Tunnel is up, The partner gets the request but their firewall rejects the request as the Elastic IP is not being sent but rather a Private IP.

What can I be missing and has anyone set this up with a design I can use, thanks.

  • Basically I have a service hosted on Lambda that will call a partner service. The partner service is only available via VPN and requires not only the Tunnel IPs but also a fixed IP where the request originates from that needs to be opened on their firewall.

2 Answers
2

Hello.

Public Elastic IP addresses cannot be used as source IP addresses for private connections using Site to Site VPN.
If you want to fix the private IP, you need to configure the following.
Although it is not TransitGateway, an example of using a fixed private IP for accessing on-premises is provided in the following document.
https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-scenarios.html#private-nat-allowed-range

a

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Thanks Riku, will review and feedback asap.

  • Hi Riku, we have setup but now the challenge we are having is that the Lambda needs to talk to an RDS instance that is in a different VPC to startup before it can communicate through the VPN, can this be achieved while still sending a fixed private IP?

  • @Riku, thanks so much for this proposed solution. It has worked and prevented me from having to setup a more complex solution use a custom VPN tool on EC2. This helped to keep all my services running on AWS and reduced the cost of licenses we would have needed. Really appreciate your idea on this.

1
Accepted Answer

Your Public NAT Gateway and VPN will not be connected in any shape or form. The VPN Is a virtual private network and creates a tunnel between 2 networks.

The end firewall will see the private IP Address of your Lambda function.

Rikus answer its your best option IMHO at this time unless the Firewall can allow SUBNET/Range of addresses and they allow your network ranges instead

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Thanks Gary, discussing the proposed solution from Rikus with the partner.

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.