Coder Social home page Coder Social logo

mariquit / aws-ab-util Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/aws-ab-util

0.0 1.0 0.0 383 KB

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.

License: MIT No Attribution

Shell 100.00%

aws-ab-util's Introduction

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.

aws-ab-util's People

Contributors

amazon-auto avatar tgpadua avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.