Giter Site home page Giter Site logo

enterprise-group-ltd / aws-autoscaling-suspend-resume Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 29 KB

Suspends or resumes AWS Autoscaling Groups

License: MIT License

Shell 100.00%
aws autoscaling aws-autoscaling bash bash-script bash-scripting jq aws-utilities aws-utility aws-ec2

aws-autoscaling-suspend-resume's Introduction

EGL AWS Autoscaling Suspend / Resume Utility

This utility suspends or resumes AWS Autoscaling groups.

This utility provides Autoscaling suspend/resume functionality unavailable in the AWS console or directly via the AWS CLI API.

This utility can:

  • Suspend or resume one Autoscaling Group
  • Suspend or resume a set of like-named Autoscaling Groups
  • Suspend or resume all Autoscaling Groups

This utility produces a summary report listing the suspended/resumed Autoscaling Groups.

Getting Started

  1. Instantiate a local or EC2 Linux instance
  2. Install or update the AWS CLI utilities
    • The AWS CLI utilities are pre-installed on AWS EC2 Linux instances
    • To update on an AWS EC2 instance: $ sudo pip install --upgrade awscli
  3. Create an AWS CLI named profile that includes the required IAM permissions
    • See the "Prerequisites" section for the required IAM permissions
    • To create an AWS CLI named profile: $ aws configure --profile MyProfileName
    • AWS CLI named profile documentation is here: Named Profiles
  4. Install the bash shell
    • The bash shell is included in most distributions and is pre-installed on AWS EC2 Linux instances
  5. Install jq
    • To install jq on AWS EC2: $ sudo yum install jq -y
  6. Download this utility script or create a local copy and run it on the local or EC2 Linux instance
    • Example: $ bash ./aws-asg-suspend-resume.sh -a s -n all -p MyProfileName
  • bash - Linux shell
  • jq - JSON wrangler
  • AWS CLI - command line utilities (pre-installed on AWS AMIs)
  • AWS CLI profile with IAM permissions for the following AWS CLI commands:
    • autoscaling describe-auto-scaling-groups
    • autoscaling suspend-processes
    • autoscaling resume-processes
    • sts get-caller-identity (used to pull the AWS account number for the report)

Deployment

To execute the utility:

  • Example: $ bash ./aws-asg-suspend-resume.sh

To directly execute the utility:

  1. Set the execute flag: $ chmod +x aws-asg-suspend-resume.sh
  2. Execute the utility
    • Example: $ ./aws-asg-suspend-resume.sh -a s -n all -p MyProfileName

Output

  • Summary report
  • Debug log (execute with the -g y parameter)
    • Example: $ bash ./aws-asg-suspend-resume.sh -a s -n all -p MyProfileName -g y
  • Console verbose mode (execute with the -b y parameter)
    • Example: $ bash ./aws-asg-suspend-resume.sh -a s -n all -p MyProfileName -b y

Contributing

Please read CONTRIBUTING.md for the process for submitting pull requests to us.

Versioning

We use SemVer for versioning.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

aws-autoscaling-suspend-resume's People

Contributors

dhackney avatar

Watchers

 avatar  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.