- Newest
- Most votes
- Most comments
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
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.
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
Thanks Gary, discussing the proposed solution from Rikus with the partner.
Relevant content
- AWS OFFICIALUpdated 3 months ago

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.