Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set AWS ELB block too many queries from a given IP?

We have had issues where one IP makes hundreds of requests to our servers, resulting in an overloaded RDS database. Is there a way to set our AWS ELB to block in the case of this DOS-like behavior?

like image 439
william tell Avatar asked Feb 09 '16 20:02

william tell


People also ask

How many connections can ELB handle?

60,000 active flows (or connections) (sampled per minute). 1 GB per hour for EC2 instances, containers and IP addresses as targets.

Why does ELB has more than 1 IP address?

All the load balancers of a ELB registers their IP addresses on the DNS service at Amazon's side. So for different queries, Amazon will return different IP addresses. This is why ELB only has a DNS name instead of a static IP address.

How many IP addresses does an ELB use?

For more information, see Routing traffic to an ELB load balancer in the Amazon Route 53 Developer Guide. The load balancer has one IP address per enabled Availability Zone. These are the addresses of the load balancer nodes.


1 Answers

Well, this is a very old post but you can do it with AWS WAF, you just need to attach an ACL to your ELB and set a rate limit rule like in the image: enter image description here

I hope this helps someone in the future, I had a really big problem an this solved it for me.

like image 68
roccolocko Avatar answered Oct 14 '22 01:10

roccolocko