Warning I deny any responsibility for using this article to launch an assault on a website that you don’t own.
TL;DR
In this article, you will find a procedure to launch a distributed load test of ApacheBench (AB) on your website. I will use BeesWithMachineGuns.
Requirements
- Boto / awscli
- Python 2.6 - 3.6
- paramiko
Installation
aws configurewith your credentialssudo 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.
Run
eval $(ssh-agent -s)
ssh-add your_key.pem
Bees Usage
Let’s launch a bees attack!

Please use a specific security group and subnet.
Sample result
|
|
Then shut down your bees army: bees down
Double-check that there are no more EC2 instances running in the EC2 console.
Tips
- Check the AMI you are using and validate that AB is properly installed.
- Use the following option to tag your instances:
-x "{'Project':'Bees'}". - Prefer
t2.microinstance type, cheaper thant1.microand more robust for a large attack. - You should try the
-b 0.0040switch (for example) to launch the bees army on the spot market. - You can also try
hurl attack.
I recommend you 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 questions, on Twitter or in the comments below.
That’s all folks!
zoph.