Warning I deny any responsibility for using this article to launch an assault on a website that you don’t own.
In this article, you will find a procedure to launch a distributed load test of ApacheBench (AB) on your website. I will use: BeesWithMachineGuns
- Boto / awscli
- Python 2.6 - 3.6
aws configurewith your credentials
sudo pip install https://github.com/newsapps/beeswithmachineguns/archive/master.zip
Launch ssh-agent, add your key:
Copy your EC2 ssh-key pair to your instance, in
/home/ec2-user/.ssh/. This key will be used to launch bees.
The name of the key must be the same name as it shows in the EC2 console.
eval $(ssh-agent -s)
Let’s launch a bees attack!
Please use a specific security group and subnet.
-n NUMBER, --number=NUMBER The number of total connections to make to the target (default: 1000). -c CONCURRENT, --concurrent=CONCURRENT The number of concurrent connections to make to the target (default: 100).
Then shutdown your bees army:
Double check if there is no more EC2 instance running in EC2 console.
- Check the AMI you are using, validate that AB is properly installed.
- Use the following option to tag your instances:
t2.microinstance type cheaper than
t1.microand more robust for a large attack.
- You should try
-b 0.0040switch (for example) to launch bees army on spot market.
- You can also try
I recommend you to make your own ami image. I’ve used the official one, but surprisingly, there is no ApacheBench installed.
Official ami :
ami-8b8f59f2 (eu-west-1) - Link
Please don’t hesitate to ping me with any question, on Twitter or in comments below.