How to prevent Ddos attacks from producing costs for small websites

0

I have the following pattern/architecture to deploy a website with CDK:

  • WAF with a custom IP-based ratelimit for a Cloudfront Distribution with Api Gateway as Origin.
  • a default ratelimit at the Api Gateway additionally.

I would use this pattern to deploy potentially multiple web apps for small hobby projects in the future.

But a weak point of this architecture would be WAF. WAF does produce costs: 60 Cents per million requests.

So the costs for a small hobby project could explode in theory, if it gets hit by a DDOS attack. What could I do here to prevent this? It would be really nice, if AWS had some base protection against DDOS where Shield Advanced is not well suited price-wise.

The last thing I could do, I could set up a Budget alarm and trigger some action to take all web apps offline, if the budget gets hit. Otherwise I would be afraid that costs could explode anytime, if there were small web apps of hobby scale publicly available in the internet.

Thank you

mampf
已提問 6 個月前檢視次數 366 次
1 個回答
0
已接受的答案

As you said, without Shield advanced it's hard to control the cost for DDoS attacks, there are AWS best practices for DDoS- • Always prefer AWS Services that operate at Edge Locations (CloudFront, Route53 and Global Accelerator) as an entry point for your applications. Provides a better DDoS resiliency (always-on mitigation for fastest detection and mitigation, distributed mitigation capacity and automatic traffic engineering) • Protect your DNS infrastructure: Using Amazon Route53, your application will be protected against DNS application layer attacks as the responsibility for serving authoritative DNS answers is outsourced AWS. Attackers will be unable to affect your application availability by targeting your DNS resolvers. • Protect your Origins § Use custom header or CloudFront prefix-list (if your origin is behind CloudFront) to protect against any direct to origin attacks § Protect against Security-Groups Connection Tracking exhaustion in case of DDoS event, by using untracked connections SG with managed services like ALB or CLB. • Scalable architecture § Using autoscaling and load balancing to dynamically increase your application capacity for instance

profile pictureAWS
支援工程師
Ravid_G
已回答 6 個月前
profile pictureAWS
專家
已審閱 6 個月前
  • Thanks for the suggstions :)

    It does help. So in the end one cannot deploy a webapp and be 100% sure that costs dont spike up to high numbers, if there were any attacks.

    Will try to set up a budget alarm then, which will take my hobby projects offline.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南