- Newest
- Most votes
- Most comments
Hello.
Since it is unlikely that AWS will lower the cost of NAT Gateway, it would be better to explore other methods to reduce costs.
How about using a NAT instance instead of a NAT gateway?
However, It is possible to reduce costs by using NAT Instance, but since it will be running on EC2, you may need to take measures such as updating the OS and maintaining AWS.
https://docs.aws.amazon.com/vpc/latest/userguide/work-with-nat-instances.html#create-nat-ami
Additionally, if all the destinations your system is accessing support IPv6, you can switch to IPv6 and no longer need to use a NAT Gateway.
https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway.html
If you only need access to internet you could also run your function in Amazon provided VPC (I think this is the default config) and avoid all costs related to running your own VPC and NAT GW.
I was also going to suggest this approach
The default AWS VPC for Lambda does not allow Lambda access AWS Services. So it needs a VPC.
Relevant content
- asked 9 months ago
- asked a year ago
- AWS OFFICIALUpdated a year ago

It sounds a better solution. I will try it
I already have a EC2 instance on public subnet. Can I use it as NAT instance?
Yes, it can be used as a NAT instance after configuration. However, if you are hosting an application etc., it is better to create a separate EC2 and create a NAT instance.
What does it mean if I can't access AWS services in Lambda's default AWS VPC? If you have configured Lambda with the correct IAM role, you should be able to access it with the default settings.
I created a new EC2 as NAT Instance with T4g.micro (2x vCPU 1GB RAM) and it worked with a fair price. Thank you!