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

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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠