How it works...

As AWS services are highly durable in nature, you can have ELB and ASG in the case of an attack:

  • All the requests will come to your Elastic Load Balancing and beneath that, it will go to your EC2 servers.
  • You can configure CloudWatch to react on the sudden spikes (For example, trigger an alarm and send SNS notification or trigger EC2 instances using Auto Scaling).
  • Auto Scaling will scale out your web server based on the load or number of requests.
  • This will give you some time to fight against the attack by serving data to good users. Even under heavy attack, the web servers could scale to perform and provide optimal user experience by leveraging cloud elasticity.
  • Auto Scaling will shrink back when the attack stops.

Get AWS Networking Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.