# S3-hosted static website subject to DDoS attack?

**URL:** <https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108>\
**Category:** Billing & Cost\
**Tags:** billing\
**Created:** [March 5, 2026, 6:05pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108 "2026-03-05T18:05:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vista\_Lake](https://awshq.com/letter_avatar_proxy/v4/letter/v/ecb155/32.png) [@Vista\_Lake](https://awshq.com/u/Vista_Lake)\
**Post date:** [March 5, 2026, 6:05pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/1 "2026-03-05T18:05:07Z")

</div>

I read about attacks that resulted in exorbitant billing, something that couldn’t happen when I used a commercial server-based hosting company ([hosting.com](http://hosting.com)). I’m set up for a notification when my monthly billing reaches a limit, but the DDoS attack could occur when I’m sleeping or on vacation, when I can’t respond right away to the notification.

Should I move my website back to [hosting.com](http://hosting.com)?

* * *

**Related discussions:**

- [AWS Account on Hold](https://awshq.com/t/aws-account-on-hold/21097)
- [AWS billing is way too confusing for me](https://awshq.com/t/aws-billing-is-way-too-confusing-for-me/20742)
- [Closed AWS account am I 100% safe from charges?](https://awshq.com/t/closed-aws-account-am-i-100-safe-from-charges/21525)
- [Deepseek v4 Pro](https://awshq.com/t/deepseek-v4-pro/21491)
- [Demand consumer protections from billing errors in response to today’s AWS global billing fiasco](https://awshq.com/t/demand-consumer-protections-from-billing-errors-in-response-to-todays-aws-global-billing-fiasco/21463)

---

<div class="post-metadata">

**Author:** ![sad-whale](https://awshq.com/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@sad-whale](https://awshq.com/u/sad-whale)\
**Post date:** [March 5, 2026, 6:09pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/2 "2026-03-05T18:09:23Z")

</div>

Use CloudFront. Set up billing alerts. You can even set it up to shut down a service at a certain level.

---

<div class="post-metadata">

**Author:** ![PokeRestock](https://awshq.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@PokeRestock](https://awshq.com/u/PokeRestock)\
**Post date:** [March 5, 2026, 6:10pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/3 "2026-03-05T18:10:17Z")

</div>

Your bucket shouldnt be accessible on the internet only through cloudfront

---

<div class="post-metadata">

**Author:** ![ItalyExpat](https://awshq.com/letter_avatar_proxy/v4/letter/i/a88e4f/32.png) [@ItalyExpat](https://awshq.com/u/ItalyExpat)\
**Post date:** [March 5, 2026, 6:12pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/4 "2026-03-05T18:12:53Z")

</div>

Unless you have specific requirements such as setting access permissions on a per-object basis, check out Cloudflare R2. It uses the S3 API and behaves almost identically but there are no egress fees and you can keep it behind Cloudflare’s proxy. I recently moved our statically hosted product there and it’s been rock solid.

---

<div class="post-metadata">

**Author:** ![Living\_off\_coffee](https://awshq.com/letter_avatar_proxy/v4/letter/l/ecccb3/32.png) [@Living\_off\_coffee](https://awshq.com/u/Living_off_coffee)\
**Post date:** [March 5, 2026, 6:18pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/5 "2026-03-05T18:18:02Z")

</div>

> [@sad-whale](#):
>
> Use CloudFront. Set up billing alerts. You can even set it up to shut down a service at a certain level.

I assume you mean with a cloud watch metric and something like event bridge? So not out of the box.

It’s also worth noting that billing can take a while to update - I believe up to 24 hours. So any actions might happen a day after the issue.

---

<div class="post-metadata">

**Author:** ![Capital-Actuator6585](https://awshq.com/letter_avatar_proxy/v4/letter/c/48db29/32.png) [@Capital-Actuator6585](https://awshq.com/u/Capital-Actuator6585)\
**Post date:** [March 5, 2026, 6:21pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/6 "2026-03-05T18:21:32Z")

</div>

> [@sad-whale](#):
>
> Use CloudFront. Set up billing alerts. You can even set it up to shut down a service at a certain level.

Just to tack on here, the reason to use cloud front is because it supports AWS shield which is their service to provide ddos protection. Also, adding a waf on the cloud front with rate limiting can further mitigate cost based attacks.

---

<div class="post-metadata">

**Author:** ![Your\_CS\_TA](https://awshq.com/letter_avatar_proxy/v4/letter/y/82dd89/32.png) [@Your\_CS\_TA](https://awshq.com/u/Your_CS_TA)\
**Post date:** [March 5, 2026, 6:22pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/7 "2026-03-05T18:22:41Z")

</div>

> [@sad-whale](#):
>
> Use CloudFront. Set up billing alerts. You can even set it up to shut down a service at a certain level.

CloudFront has flat price billing options now. Tie it to that, and it should cap the spending.

---

<div class="post-metadata">

**Author:** ![Your\_CS\_TA](https://awshq.com/letter_avatar_proxy/v4/letter/y/82dd89/32.png) [@Your\_CS\_TA](https://awshq.com/u/Your_CS_TA)\
**Post date:** [March 5, 2026, 6:24pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/8 "2026-03-05T18:24:56Z")

</div>

Posted it under sad-whale’s comment but use flat rate pricing with CloudFront, then you will max cap that single entry point: [https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-flat-rate-pricing-plans-with-no-overages/](https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-flat-rate-pricing-plans-with-no-overages/)

Still add billing alerts because why not 🙂

---

<div class="post-metadata">

**Author:** ![sad-whale](https://awshq.com/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@sad-whale](https://awshq.com/u/sad-whale)\
**Post date:** [March 5, 2026, 6:28pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/9 "2026-03-05T18:28:04Z")

</div>

> [@Capital-Actuator6585](#):
>
> Just to tack on here, the reason to use cloud front is because it supports AWS shield which is their service to provide ddos protection. Also, adding a waf on the cloud front with rate limiting can further mitigate cost …

☝  
Shield standard is free. Paying for WAF may or may not be worth it depending on traffic, whether you can afford downtime, likelihood of an attack…

---

<div class="post-metadata">

**Author:** ![sad-whale](https://awshq.com/letter_avatar_proxy/v4/letter/s/ce73a5/32.png) [@sad-whale](https://awshq.com/u/sad-whale)\
**Post date:** [March 5, 2026, 6:29pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/10 "2026-03-05T18:29:29Z")

</div>

> [@Living\_off\_coffee](#):
>
> I assume you mean with a cloud watch metric and something like event bridge? So not out of the box. It’s also worth noting that billing can take a while to update - I believe up to 24 hours. So any actions might happen …

Not out of the box but easy enough to set up. You can find step by step instructions and code samples online.

---

<div class="post-metadata">

**Author:** ![CommercialFerret5924](https://awshq.com/letter_avatar_proxy/v4/letter/c/5f8ce5/32.png) [@CommercialFerret5924](https://awshq.com/u/CommercialFerret5924)\
**Post date:** [March 5, 2026, 6:48pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/11 "2026-03-05T18:48:10Z")

</div>

You can link the same notification to a lambda which can bring the resource down to avoid any further problem.

---

<div class="post-metadata">

**Author:** ![Fun\_Ocelot](https://awshq.com/letter_avatar_proxy/v4/letter/f/6f9a4e/32.png) [@Fun\_Ocelot](https://awshq.com/u/Fun_Ocelot)\
**Post date:** [March 5, 2026, 7:47pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/12 "2026-03-05T19:47:28Z")

</div>

> [@PokeRestock](#):
>
> Your bucket shouldnt be accessible on the internet only through cloudfront

CloudFront is the way

---

<div class="post-metadata">

**Author:** ![Willkuer1](https://awshq.com/letter_avatar_proxy/v4/letter/w/bb73d2/32.png) [@Willkuer1](https://awshq.com/u/Willkuer1)\
**Post date:** [March 5, 2026, 10:16pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/13 "2026-03-05T22:16:16Z")

</div>

> [@Your\_CS\_TA](#):
>
> Posted it under sad-whale’s comment but use flat rate pricing with CloudFront, then you will max cap that single entry point: …

Not only because why not but also because they are free and it’s not only ddos attacks that can create large bills.

---

<div class="post-metadata">

**Author:** ![Sirwired](https://awshq.com/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@Sirwired](https://awshq.com/u/Sirwired)\
**Post date:** [March 6, 2026, 12:00am UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/14 "2026-03-06T00:00:31Z")

</div>

Personally, I’m not sure why they still make static public web hosting even an option, when CF is 100% superior, and doesn’t take that much additional configuration.

---

<div class="post-metadata">

**Author:** ![Vista\_Lake](https://awshq.com/letter_avatar_proxy/v4/letter/v/ecb155/32.png) [@Vista\_Lake](https://awshq.com/u/Vista_Lake)\
**Post date:** [March 6, 2026, 1:53am UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/15 "2026-03-06T01:53:59Z")

</div>

> [@sad-whale](#):
>
> Use CloudFront. Set up billing alerts. You can even set it up to shut down a service at a certain level.

I do use CloudFront and I do have a billing alert. My concern is that isn’t enough. Below someone suggested a lambda to shut it down, but I’m not sure I want to add even more complexity. I’m not sure how do sufficient testing.

---

<div class="post-metadata">

**Author:** ![N0tWithThatAttitude](https://awshq.com/letter_avatar_proxy/v4/letter/n/ecc23a/32.png) [@N0tWithThatAttitude](https://awshq.com/u/N0tWithThatAttitude)\
**Post date:** [March 6, 2026, 3:05am UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/16 "2026-03-06T03:05:48Z")

</div>

Could use a WAF with the DDoS protection rule but that has its own costs. Could do a broad manual rate limit rule.

---

<div class="post-metadata">

**Author:** ![ManBearHybrid](https://awshq.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@ManBearHybrid](https://awshq.com/u/ManBearHybrid)\
**Post date:** [March 6, 2026, 9:17am UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/17 "2026-03-06T09:17:02Z")

</div>

> [@sad-whale](#):
>
> ☝ Shield standard is free. Paying for WAF may or may not be worth it depending on traffic, whether you can afford downtime, likelihood of an attack…

The new [flat-rate pricing in Cloudfront](https://aws.amazon.com/cloudfront/pricing/) has a free option for hobbyists and beginners that even included DDoS protection and 5x WAF rules.

Important to note - you need to implement origin access control to make sure only cloudfront can access your bucket assets. Otherwise CF doesn’t help this problem at all.

Only down side is I can’t seem to see how to implement flat-rate pricing in the python CDK yet. It was only announced 3 week ago, so probably not yet available in IaC.

---

<div class="post-metadata">

**Author:** ![ManBearHybrid](https://awshq.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@ManBearHybrid](https://awshq.com/u/ManBearHybrid)\
**Post date:** [March 6, 2026, 9:21am UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/18 "2026-03-06T09:21:58Z")

</div>

> [@Vista\_Lake](#):
>
> I do use CloudFront and I do have a billing alert. My concern is that isn’t enough. Below someone suggested a lambda to shut it down, but I’m not sure I want to add even more complexity. I’m not sure how do sufficient …

> I don’t like the idea of enabling features and adding code to implement security. Complexity creates opportunities for system failure.

I mean, the obvious solution then is to shut down your website! You can’t have code failure if you have no code!

I joke, obviously. In seriousness, the lambda with billing alert is an option, but it’s overkill for this purpose. Look into Cloudfront’s new flat-rate pricing (announced earlier this month). There’s a free option, no overage fees, built-in security options, and you don’t pay for traffic from attacks.

---

<div class="post-metadata">

**Author:** ![lbp1010](https://awshq.com/letter_avatar_proxy/v4/letter/l/49beb7/32.png) [@lbp1010](https://awshq.com/u/lbp1010)\
**Post date:** [March 6, 2026, 11:18am UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/19 "2026-03-06T11:18:41Z")

</div>

> [@ManBearHybrid](#):
>
> The new [flat-rate pricing in Cloudfront](https://aws.amazon.com/cloudfront/pricing/) has a free option for hobbyists and beginners that even included DDoS protection and 5x WAF rules. Important to note - you need to …

i also didn’t see a way to enable via cdk, i had to enable it manually after deploying

---

<div class="post-metadata">

**Author:** ![turn-based-games](https://awshq.com/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@turn-based-games](https://awshq.com/u/turn-based-games)\
**Post date:** [March 6, 2026, 12:03pm UTC](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108/20 "2026-03-06T12:03:29Z")

</div>

Huge fan of AWS, but for a completely static site I’d recommend [CloudFlare Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/github-pages-limits#usage-limits) (now deprecated in favor of [CloudFlare Workers with static assets](https://docs.github.com/en/pages/getting-started-with-github-pages/github-pages-limits#usage-limits)), since it’s completely free AND has no limits.

[GitHub Pages is also free (no payment info even required) but has a soft bandwidth limit of 100GB per month.](https://docs.github.com/en/pages/getting-started-with-github-pages/github-pages-limits#usage-limits)

[The free plan on CloudFront (AWS CDN that goes in front of S3) supports up to 1M monthly requests.](https://aws.amazon.com/cloudfront/pricing#plans-and-features)

As you’ve discovered, AWS in general is often not ideal for preventing denial-of-wallet attacks. Research into solving this exact problem for my own site on AWS was how I discovered CloudFlare’s offerings in the first place.

[Next page](https://awshq.com/t/s3-hosted-static-website-subject-to-ddos-attack/21108.md?page=2)
