Skip to content

aws-samples/aws-ab-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

AWS AB Util

AWS AB Util is a CLI utility tool to manage the deployment and execution of distributed load test with AB (Apache Bench) using AWS SSM and Amazon EC2. It can generate thousands of RPS (Requests per Second) and/or Gigabytes per second of data transfer.

Requirements

  • OS: Linux, MacOS
  • Software: AWS CLI
  • AWS CLI with permissions to execute AWS SSM Run Command and Amazon EC2 Admin Access
  • AWS IAM Role named SSMInstanceProfile as described in the SSM documentation

Install

git clone https://github.com/aws-samples/aws-ab-util.git
sudo mv aws-ab-util/aws-ab-util /usr/local/bin/
rm -fr aws-ab-util

Usage

Overall options.

# aws-ab-util
Usage: aws-ab-util <command> [parameters]
  cmd "[command]"
  create servers_count
  delete
  run [ab-options] [http[s]://]hostname[:port]/[path]

Creating 2x load test servers.

# aws-ab-util create 2
Creating Load Test Servers...

Running a load test with 100 requests, per thread, per server. This will result in 1.000 request (100 requests x 5 threads x 2 servers).

# aws-ab-util run -c 5 -n 100 https://www.amazon.com/
Sending SSM Command...
Running Load Test...
Status: Success Success
Detail: https://console.aws.amazon.com/systems-manager/run-command/00000000-1111-2222-3333-444444444444

Deleting servers

# aws-ab-util delete
Deleting Load Test Servers...

Executing a command to create a JSON file

aws-ab-util cmd "echo '{\"message\":\"hello world\"}' > /tmp/payload.json"

SSM Run Command View

SSM Command Execution

SSM Command Output

Load Test Results Example

Load test results example

Uninstall

sudo rm /usr/local/bin/aws-ab-util

Troubleshooting

Error: Invalid IAM Instance Profile name

Resolution: Create an IAM Role named SSMInstanceProfile, trusting in EC2 entity, with AmazonSSMManagedInstanceCore policy attached (documentation).

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

AWS AB Util is a CLI utility tool to manage the deployment and execution of distributed load test with AB (Apache Bench) using AWS SSM and Amazon EC2.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages