# Nat gateways are too expensive (2023)

**URL:** <https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227>\
**Category:** AWS Networking\
**Tags:** vpc, nat-gateway\
**Created:** [September 22, 2023, 5:35pm UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227 "2023-09-22T17:35:38Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![adkud](https://awshq.com/letter_avatar_proxy/v4/letter/a/b38774/32.png) [@adkud](https://awshq.com/u/adkud)\
**Post date:** [September 22, 2023, 8:30pm UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/21 "2023-09-22T20:30:43Z")

</div>

> [@rwoj](#):
>
> why do you think you need to use a NAT gateway?

If you want to run application instances or lambdas in a private subnet you need to have a NAT gateway if you want them to be able to make outbound internet connections. Running your applications in a private subnet is desirable from a security perspective because they won’t be accessible from the public internet. You can run load balancers in a public subnet and route traffic to the app instances in the private subnet.

---

<div class="post-metadata">

**Author:** ![devtopper](https://awshq.com/letter_avatar_proxy/v4/letter/d/43a26b/32.png) [@devtopper](https://awshq.com/u/devtopper)\
**Post date:** [September 22, 2023, 8:53pm UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/22 "2023-09-22T20:53:24Z")

</div>

> [@andrewguenther](#):
>
> [https://github.com/AndrewGuenther/fck-nat](https://github.com/AndrewGuenther/fck-nat) [https://fck-nat.dev/](https://fck-nat.dev/) Run your own on EC2!

In fact, you can run anything you want

---

<div class="post-metadata">

**Author:** ![Devopies](https://awshq.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@Devopies](https://awshq.com/u/Devopies)\
**Post date:** [September 22, 2023, 8:57pm UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/23 "2023-09-22T20:57:57Z")

</div>

VPC endpoints to which services? it will cost less per GB but there is a cost per VPC endpoint. You need to add more details.

Depends on your use case. I am in favour to use NAT GW as in specific industry you want to have some levels of SLAs and similar rules. If you use self-NAT-GW as many comments suggest, you move that responsibility back to you instead of using AWS mechanisms for HA and security.

---

<div class="post-metadata">

**Author:** ![raunchieska](https://awshq.com/letter_avatar_proxy/v4/letter/r/ecccb3/32.png) [@raunchieska](https://awshq.com/u/raunchieska)\
**Post date:** [September 22, 2023, 9:35pm UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/24 "2023-09-22T21:35:54Z")

</div>

> [@AWS\_CLOUD](#):
>
> AWS networking is expensive

just … networking?

---

<div class="post-metadata">

**Author:** ![ManyInterests](https://awshq.com/letter_avatar_proxy/v4/letter/m/839c29/32.png) [@ManyInterests](https://awshq.com/u/ManyInterests)\
**Post date:** [September 22, 2023, 9:49pm UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/25 "2023-09-22T21:49:43Z")

</div>

You could run resources in public subnets instead. Though, that has obvious downsides.

---

<div class="post-metadata">

**Author:** ![exigenesis](https://awshq.com/letter_avatar_proxy/v4/letter/e/6f9a4e/32.png) [@exigenesis](https://awshq.com/u/exigenesis)\
**Post date:** [September 22, 2023, 10:00pm UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/26 "2023-09-22T22:00:23Z")

</div>

> [@jerutley](#):
>
> Databases shouldn’t need to reach out to the public internet, so they should be just fine in a private subnet without a NAT gateway. The right solution for avoiding NAT gateway, if you’re small enough scale that the …

And depending on what traffic you need to let out, your NAT instance can do egress traffic filtering for extra security goodness too.

---

<div class="post-metadata">

**Author:** ![mreed911](https://awshq.com/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@mreed911](https://awshq.com/u/mreed911)\
**Post date:** [September 22, 2023, 11:04pm UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/27 "2023-09-22T23:04:59Z")

</div>

[https://medium.com/life-at-chime/how-we-reduced-our-aws-bill-by-seven-figures-5144206399cb](https://medium.com/life-at-chime/how-we-reduced-our-aws-bill-by-seven-figures-5144206399cb)

---

<div class="post-metadata">

**Author:** ![krishopper](https://awshq.com/letter_avatar_proxy/v4/letter/k/9f8e36/32.png) [@krishopper](https://awshq.com/u/krishopper)\
**Post date:** [September 23, 2023, 12:10am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/28 "2023-09-23T00:10:49Z")

</div>

> [@andrewguenther](#):
>
> [https://github.com/AndrewGuenther/fck-nat](https://github.com/AndrewGuenther/fck-nat) [https://fck-nat.dev/](https://fck-nat.dev/) Run your own on EC2!

Thanks for sharing this. Never knew it existed and am sad it took me so long to learn about it, but am happy now!

---

<div class="post-metadata">

**Author:** ![opensrcdev](https://awshq.com/letter_avatar_proxy/v4/letter/o/4bbf92/32.png) [@opensrcdev](https://awshq.com/u/opensrcdev)\
**Post date:** [September 23, 2023, 12:22am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/29 "2023-09-23T00:22:17Z")

</div>

Agreed, they are expensive. Use IPv6-only, and NAT Gateways are a thing of the past. 🙂

---

<div class="post-metadata">

**Author:** ![opensrcdev](https://awshq.com/letter_avatar_proxy/v4/letter/o/4bbf92/32.png) [@opensrcdev](https://awshq.com/u/opensrcdev)\
**Post date:** [September 23, 2023, 12:22am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/30 "2023-09-23T00:22:47Z")

</div>

> [@AWS\_CLOUD](#):
>
> AWS networking is expensive

Their egress costs are asinine compared to most other cloud vendors (not counting big 3).

---

<div class="post-metadata">

**Author:** ![FeelingCurl1252](https://awshq.com/letter_avatar_proxy/v4/letter/f/c0e974/32.png) [@FeelingCurl1252](https://awshq.com/u/FeelingCurl1252)\
**Post date:** [September 23, 2023, 12:31am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/31 "2023-09-23T00:31:32Z")

</div>

[Loxilb](https://github.com/loxilb-io/loxilb) is free and provides both LB and NAT.

---

<div class="post-metadata">

**Author:** ![Rude\_Strawberry](https://awshq.com/letter_avatar_proxy/v4/letter/r/6de8d8/32.png) [@Rude\_Strawberry](https://awshq.com/u/Rude_Strawberry)\
**Post date:** [September 23, 2023, 12:36am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/32 "2023-09-23T00:36:05Z")

</div>

> [@ManyInterests](#):
>
> You could run resources in public subnets instead. Though, that has obvious downsides.

What’s the plus point to not doing it this way?

---

<div class="post-metadata">

**Author:** ![CripplingPoison](https://awshq.com/letter_avatar_proxy/v4/letter/c/779978/32.png) [@CripplingPoison](https://awshq.com/u/CripplingPoison)\
**Post date:** [September 23, 2023, 12:49am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/33 "2023-09-23T00:49:21Z")

</div>

> [@andrewguenther](#):
>
> [https://github.com/AndrewGuenther/fck-nat](https://github.com/AndrewGuenther/fck-nat) [https://fck-nat.dev/](https://fck-nat.dev/) Run your own on EC2!

Brilliant!

---

<div class="post-metadata">

**Author:** ![TangerineDream82](https://awshq.com/letter_avatar_proxy/v4/letter/t/9de0a6/32.png) [@TangerineDream82](https://awshq.com/u/TangerineDream82)\
**Post date:** [September 23, 2023, 1:09am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/34 "2023-09-23T01:09:08Z")

</div>

> [@im\_with\_the\_cats](#):
>
> If you’re comfortable with Linux, a NAT instance could be the way to go: [https://docs.aws.amazon.com/vpc/latest/userguide/VPC\_NAT\_Instance.html](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html)

Unless you want high availability, and scalability.

But for person project, yes

---

<div class="post-metadata">

**Author:** ![spirilis](https://awshq.com/letter_avatar_proxy/v4/letter/s/8e8cbc/32.png) [@spirilis](https://awshq.com/u/spirilis)\
**Post date:** [September 23, 2023, 1:28am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/35 "2023-09-23T01:28:25Z")

</div>

> [@andrewguenther](#):
>
> [https://github.com/AndrewGuenther/fck-nat](https://github.com/AndrewGuenther/fck-nat) [https://fck-nat.dev/](https://fck-nat.dev/) Run your own on EC2!

I lol’d, shared it with coworkers, and then lol’d some more!

---

<div class="post-metadata">

**Author:** ![Fatel28](https://awshq.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@Fatel28](https://awshq.com/u/Fatel28)\
**Post date:** [September 23, 2023, 2:31am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/36 "2023-09-23T02:31:42Z")

</div>

> [@opensrcdev](#):
>
> Their egress costs are asinine compared to most other cloud vendors (not counting big 3).

Why would you not count the big 3 when comparing one of the big 3 to “other cloud vendors”

---

<div class="post-metadata">

**Author:** ![opensrcdev](https://awshq.com/letter_avatar_proxy/v4/letter/o/4bbf92/32.png) [@opensrcdev](https://awshq.com/u/opensrcdev)\
**Post date:** [September 23, 2023, 3:10am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/37 "2023-09-23T03:10:34Z")

</div>

> [@Fatel28](#):
>
> Why would you not count the big 3 when comparing one of the big 3 to “other cloud vendors”

Because the “big 3” tend to be universally overpriced for certain things. Storage, egress, etc.

---

<div class="post-metadata">

**Author:** ![Fatel28](https://awshq.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@Fatel28](https://awshq.com/u/Fatel28)\
**Post date:** [September 23, 2023, 3:11am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/38 "2023-09-23T03:11:17Z")

</div>

> [@opensrcdev](#):
>
> Because the “big 3” tend to be universally overpriced for certain things. Storage, egress, etc.

Overpriced is a very strong word to use.. it’s definitely not apples to apples

---

<div class="post-metadata">

**Author:** ![rwoj](https://awshq.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@rwoj](https://awshq.com/u/rwoj)\
**Post date:** [September 23, 2023, 3:14am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/39 "2023-09-23T03:14:28Z")

</div>

> [@adkud](#):
>
> If you want to run application instances or lambdas in a private subnet you need to have a NAT gateway if you want them to be able to make outbound internet connections. Running your applications in a private subnet is …

> Running your applications in a private subnet is desirable from a security perspective because they won’t be accessible from the public internet.

security groups exist.

---

<div class="post-metadata">

**Author:** ![rwoj](https://awshq.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@rwoj](https://awshq.com/u/rwoj)\
**Post date:** [September 23, 2023, 3:15am UTC](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227/40 "2023-09-23T03:15:10Z")

</div>

> [@alifeinbinary](#):
>
> To place your database behind it so that it’s not directly accessible via the internet. Sure, maybe overkill if OP’s app isn’t storing user data or other sensitive information in the database but there are valid reasons …

> To place your database behind it so that it’s not directly accessible via the internet.

security groups exist.

> there are valid reasons to use a NAT gateway, mitigating security and data protection liability being the most significant

NAT is not security. never has been, never will be.

[Previous page](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227.md?page=1)

[Next page](https://awshq.com/t/nat-gateways-are-too-expensive-2023/17227.md?page=3)
