Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fylzero's avatar
Level 67

How do you protect Vapor from DDoS spin ups?

Just curious. I haven't looked into this much yet... but I've been considering moving some apps to Vapor.

How does one make sure that AWS doesn't send you a massive bill if your app is hit with a DDoS attack?

Is there built-in protection for this on the Vapor or AWS side? Do I need to implement Cloudfront?

Curious what, if anything, needs to be done for this. Thanks!

0 likes
5 replies
Sinnbeck's avatar

Sounds like what aws shield is for

https://aws.amazon.com/shield/

AWS Shield is a managed Distributed Denial of Service (DDoS) protection service that safeguards applications running on AWS

If it actually works, is hard to tell :)

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

The question might be if it took 1 minute for the shield to get the attack under control.

But I think it would be interesting to contact Amazon and hear if there are any guarantees or if you can end up with a huge bill. In cases like that I would personally not trust a "secondary opinion" or hearsay. If someday you have an issue it is nice to have it on paper from the source.

fylzero's avatar
Level 67

@sinnbeck I wasn't paying close enough attention to that article I posted. The reason their DDoS attack only lasted a few minutes and cost a whopping $1.15 is because they were using Cloudflare DDoS protection.

That's kind of what I was wondering.

georgeboot's avatar

Set a maximum concurrency for your requests. This is a very easy first step to prevent your bill from exploding.

Granted, if a ddos consumes all your available concurrency, your site will still be unreachable for real customers. But your bill will be predictable.

Note that you can also put Cloudflare (for free) in front of your site. This might even be easier (and probably better?) than Shield.

2 likes

Please or to participate in this conversation.