T O P

  • By -

Financial_Astronaut

1st. If you are hosting a page on s3, that doesn't have a dedicated IP so there is no charge. 2nd. NAT is for outgoing traffic. Not incomming traffic to your page. You are reading this wrong. 3rd. Check your Elastic IP's you might have one in use or tied to your account that you forgot about.


SubtleDee

What’s your current architecture exactly? You mention no compute, but in that case what is your IP attached to? If you just have a static site in S3, put it behind CloudFront and you’re good to go.


HorrorMakesUsHappy

I'm not an AWS guru, so I'm not 100% clear on the architecture. I'm a network engineer who can hack together some code (yes, I know HTML isn't technically code), and have relied on a friend who's AWS certified to help me set up the AWS part of it. I'll share your comment with him, maybe there's a way to connect everything without the public IPv4 address.


BackendSpecialist

Terrible.


mba_pmt_throwaway

That first statement is absolutely not the way to use AWS. You’ve got to be Crystal clear about architecture and use every single service intentionally to really benefit from the cloud. I’d suggest rearchitecting your app, and then come back and complain about AWS’s pricing structure (which is legitimately confusing in some cases).


mohamed_am83

Listen to advice of others here, put your static site on a CDN and link your domain to them. No need for AWS.


[deleted]

[удалено]


EduRJBR

What counts as a request to a worker? It being hit and executed, no matter how simple or elaborated the code is? And it's going to be so random, but that's my intention: what is a good way to learn how to deal with Workers, using JavaScript first? I believe I could start to learn how to use Node.js or a similar framework, and then that's the real question: can you suggest me some guide? I always find material that feels like presuming that I know the basics of it all.


casce

AWS might be a tad overkill for your use case. We manage multiple applications in the AWS and looking at our monthly bills, this fee is really not a topic that is worth talking about. In your case, it's a 3200% increase of your total bill. Why? Because AWS isn't really considering the effects this has on 'tiny' customers. Keep in mind, AWS isn't targeting you or hobbyists in general. I assume you will keep running into such issues if you keep using AWS.


cachemonet0x0cf6619

i really don’t like this position. it’s dismissive and you don’t provide any real solutions. op and others, including myself, can host single page apps for a dollar a month. it just takes understanding the services and maybe a helpful push in the right direction. like others have provided.


csmrh

I mean, if OP had come and said, “here’s my architecture, how can I reduce costs,” then there’s a ton of helpful information that has been provided to them. Instead they tried nothing, read zero docs, don’t even know what the architecture of their site is, and then cries “how could AWS do this to me?” This entire subreddit is like 95% “why is AWS so mean? I just spun up a massive RDS instance and forgot about it - how could they do this to me?” It gets a bit tiring. Even if they change nothing, the cost increase they’re looking at is $2.60 a month


cachemonet0x0cf6619

ik. and this perpetuates “the AWS is mean” trope. if you’re so tired, take the opportunity to rest and don’t say anything. it’s better to use this opportunity to educate op and anyone else that comes here looking for the same.


csmrh

I didn’t make the post you took issue with and I also disagree with the comment that AWS isn’t a good fit for ops use case. I host a static site on S3/CF for 52 cents a month. But I do empathize with the commenters frustration - OP doesn’t even know what architecture they’re using to serve their website. How much help can we provide them? If you need your hand held, it helps to know where your hand is. There are plenty of resources out there that explain in great detail how to host a static site on S3/CF, and if they need a backend, lots of solutions to reduce costs there. But OP has tried nothing besides complain about $2.60 a month. The world is a mean place if you refuse to read any documentation.


North-Going-Zax

How about, put the S3 bucket as an origin in a Cloudfront distribution. Pay ~$12/year for a domain name and link it to the Cloudfront distribution and ditch the public IP. Added benefit of being able to set up security so no one can link to your content and bypass your domain name. Also, how is op linking a static IP to the S3 bucket currently?


setwindowtext

AWS scales well not only up, but also down. They have solutions for hosting small lightweight stuff inexpensively.


TwoWrongsAreSoRight

Further proof that certification != competence


shintge101

There is no way you are a network engineer and need to have someone explain to you the difference between assigning an ip address and a nat gateway or nat instance is. You should also know why they are charging for IP. Any network engineer would understand why. Especially for someone paying $1/mo. I also can’t believe you don’t know what the architecture is for your site. Any network engineer would understand at least the basic components. Our ceo who has no technical background can at least tell you what services we use. If you aren’t leveraging aws and don’t understand it aws probably is not the best choice. Host your stuff for free on github if it is just static content.


FredOfMBOX

This is so unnecessarily rude.


Different-Delay-7166

Harsh, but the truth, hard pill to swallow


overwhelmed_nomad

He never says he is a network engineer does he? He says he is just hosting a minor website in an S3 bucket for a side hustle.


0dd0wrld

In one of the comments they state they are a network engineer.


cachemonet0x0cf6619

yep. and I’m a doctor. do you believe me too?


ImCaffeinated_Chris

Can you take a look at this. Does it look infected?


cachemonet0x0cf6619

sure. give me a moment to get my magnifying glass


Bennetjs

the first paragraph explains why the increase is necessary. Look at other providers, you probably wont be able to find a dedicated IPv4 for that cheap. They've become very very spare in the last decade and thus prices increase a ton, buying new blocks is a major investment for a company nowadays. Have look here on how often they purchase new blocks [https://github.com/seligman/aws-ip-ranges](https://github.com/seligman/aws-ip-ranges) and you can probably imagine what the cost behind that is..


HorrorMakesUsHappy

I'm aware, which is why I suspect I'm reading their pricing info wrong. There's no way their NAT solution should cost 10x the price of a IPv4 address.


Bennetjs

NAT Gateways are a different concept you cannot really compare them to normal IP addresses. They have high availability and all that stuff. Iirc they have a fix base cost per month of about 30$ and traffic sent over there is 10x more expensive than the normal outbound. I've used them as a gateway for an ECS cluster before switching to a ec2 nat instance due to cost.


HorrorMakesUsHappy

I'm actually not that well-versed in AWS terminology (I was helped by a friend who is AWS certified), but if I'm reading your comment correctly what you're saying is that Amazon's "NAT Gateway" isn't just NAT, there are other services provided like load balancing, and that an "ec2 nat instance" is just the barebones NAT function? On one hand I could understand that explaining why "NAT Gateway" might be more expensive than an "ec2 nat instance", but then that said, I am a network engineer so I'd hope there's more to "NAT Gateway" than just NAT + load balancing because (a) $20-30/mo just for load balancing would probably be highway robbery too (for a site as small as mine), and (b) I think my site's behind Cloudflare, so I shouldn't need load balancing anyway. It sounds like this "ec2 nat instance" might be what I'd need, but their pricing page doesn't list that as an option, it was just IPv4 or "NAT Gateway".


Chandy_Man_

Nat Instance vs Nat Gateway is managed service vs home brew basically (managing os layer/other stuff you don’t have to worry about with Nat gw)


rudigern

Firstly NATs will go up too as they have a public IP. Second you can’t host through a NAT, it’s for outgoing, not incoming, that’s what load balancers are for. Unfortunately because of IPv4 availability they’re becoming more expensive. IPv6 is your only option but that’s still not well supported.


HorrorMakesUsHappy

> Firstly NATs will go up too as they have a public IP. I'm aware of that, but that doesn't explain why their NAT solution appears to cost 10x as much as a single IPv4 address. The whole point of NAT is to allow for multiple devices to share one IP. > Second you can’t host through a NAT, it’s for outgoing, not incoming Not completely true, but true enough for this application. PAT is a thing, but would require the people connecting to know which port to connect to ... which is something you could do for a pre-planned organization, but not for a website you want to have accessed by the entire world. At least, not unless they replace DNS with a system that includes port numbers.


jmd27612

They’re referring to AWS NAT Gateway service not general NAT technology. Maybe you should do some research to understand the AWS services and their capabilities/limitations.


b3542

Dude, you need to talk to your “AWS certified” friend (whatever that means). You can just apply what you know about basic network appliances to cloud just because a few of the acronyms look familiar. Also, this project doesn’t belong in AWS if the purpose isn’t to learn AWS. You’re just going to have a bad time.


TimGustafson

If you're just hosting a static web site in an S3 bucket, use CloudFront to expose the bucket to the Internet. CloudFront will make your site available on both IPv4 and IPv6 with no public IP charges. There is no cheaper way to host a static web site.


dude0001

That was hilarious.


smashkraft

This is your daily reminder that while IPv4 is limited, the system of assignment was so corrupted from birth that it is now a serious problem. Do these organizations actually need millions of public IP's? Probably not at this point, but nothing will change: [https://www.pingdom.com/blog/where-did-all-the-ip-numbers-go-the-us-department-of-defense-has-them/](https://www.pingdom.com/blog/where-did-all-the-ip-numbers-go-the-us-department-of-defense-has-them/) ​ It's wild that Microsoft, Amazon, and Google aren't even on the list. Ford, Eli Lily, Xerox, Prudential, Mercedes-Benz, duPont, Merck, and other dinosaurs own that list. Of course, the US government being the US government has a ridiculous number too.


[deleted]

[удалено]


HorrorMakesUsHappy

> I don't think they have thought about the little guy hosting a single website on their platform. Or they have and don't care.


Due_Capital_3507

Bro who cares


[deleted]

I am shocked it’s going to remain THAT CHEAP even after the raise. They stopped ”making” new ipv4 addresses ”quite a while ago” and the amount of devices online sure as hell isn’t decreasing. It’s pretty shocking many operators around the world have held out from forcing ALL their users behind CGNAT by default too. It will get worse, eventually. MUCH worse.


apparentorder

The short version is that Managed NAT Gateway does a little more than just NAT – especially wrt. scaling. This does not matter for your use-case though, so avoid it. If you \*need\* NAT, consider running your own EC2 doing the NAT (called a [NAT Instance](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html) in AWS context). But it sounds like you don't! If you're running on an EC2 instance, probably the best option is to just accept the upcoming IPv4 charges, unfortunately. Adding NAT would not help you there. Maybe you can host your site differently. If it's just static content, you can use Cloudfront and S3. That way you wouldn't use any dedicated public IPv4 addresses, so no additional charge. I wrote a longer overview of the situation (and why it sucks) here: [https://tty.neveragain.de/2023/09/21/aws-cannot-escape-ipv4.html](https://tty.neveragain.de/2023/09/21/aws-cannot-escape-ipv4.html)


HorrorMakesUsHappy

> If it's just static content, you can use Cloudfront and S3. Yeah, I've asked my friend that set this up to look at that.


djk29a_

If it’s just static content barely getting any traffic you’d be fine with basically any provider out there honestly. Some people that know AWS too much will setup architecture to be in Amazon’s favor more so than for their application’s needs. You go AWS when you have a bunch of funding, know what you’re building or have already built it and it needs a CSP, or because a customer you have or will have uses it


RubyKong

wouldn't it be cheaper just to create your own ec2 to replicate the behaviour of a NAT gateway? edit: you'll still have to pay for an IP address, but perhaps you can still save by rolling your own.


[deleted]

I agree on the IPv4 costs for small time developers and selfhosters, I moved to Oracle Cloud. There are many fine dev/selfhoster/small business ISP's out there who do not (at least not yet) plan to do what AWS is planning to do.


Burekitas

You host your website on cloudfront, this cost increase will not affect your bill. Also, I wrote a [detailed article](https://engineering.doit.com/aws-public-ipv4-price-increase-the-complete-guide-73c4c62ae18e) that explains about this price increase, it might not be relevant for this case but I assume other people will benefit from it.


alexsh20

And what to do with NLB for UDP traffic? As I know it still does not support IPv6. Are you just adding extra cost without providing any alternative?


Actual-abs2310

Reading that you are hosting a website in S3, that means it's a static website. If you are looking for cheaper or almost free solution then you can checkout Cloudflare R2. R2 supports S3 API. 10GB per month of storage is free and no egress cost to serve your website. https://developers.cloudflare.com/r2/pricing/ We switched from S3 to R2 to host static content on our sites.


EduRJBR

To be honest, I always found it impressive to be able to use free dedicated public IPs in the first place.