Skip to main content

Utilities for use with aws.

Project description

aws-utilities

This package includes various command-line utilities for use with aws.

Installation

pip

pip install aws-utilities

pipx

pipx install aws-utilities

git

To set up a local checkout with pyenv run these commands:

git clone https://github.com/reversefold/aws-utilities.git
cd aws-utilities
pyenv virtualenv 3.6.5 aws-utilities
pyenv local aws-utilities
pip install -r dev-requirements.txt
./sync-requirements.sh

Scripts

tail_cloudwatch_logs.py

Get the last n lines of a cloudwatch log group and follow the output in realtime as it is written to CloudWatch Logs. Has the ability to use any profile set up in your ~/.aws/credentials so working across multiple accounts is easy.

Inspired by cw.

tail_stack_events.py

Get the last n events for a CloudFormation stack and all of its nested stacks and follow the events in realtime. This utility can give you a view into all of the events happening in any size CloudFormation stack, even if it has multiple levels of nested stacks. When this script is started up it finds all nested stacks and follows their events as well if the stack is in any status which includes IN_PROGRESS. When following stack events, nested stacks will be dynamically added to and removed from the set of stacks being queried for events as nested stacks go into the various IN_PROGRESS and COMPLETE states. This lets you get a complete picture of what is going on while also making the minimum number of API calls.

In postmortem mode this script will find the events that caused the last stack update to fail. It will follow nested stack failures until it finds the specific resource that caused the failure.

Originally inspired by tail-stack-events and cfn-tail.

aws_switch.py

A quick and dirty script to make any one of your configured aws profiles the default profile. Useful when you're using tools which don't support profiles or when you work in distinct profiles at distinct times.

wait_for_stack_complete.py

A simple script for running on an ec2 instance. No parameters are taken. Finds the CloudFormation stack that the instance resides in and polls until the stack is in a COMPLETE state. If the stack has a parent stack it will watch that one instead. Has retries with exponential backoff (up to 5m) for all API calls so as to not overload the AWS APIs when used in a large environment. This script is particularly useful for UserData or cfn-init scripts which need to wait for other resources to be created and attached, such as EBS volumes not included in the instance's BlockDeviceMapping.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-utilities-1.3.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

aws_utilities-1.3.1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file aws-utilities-1.3.1.tar.gz.

File metadata

  • Download URL: aws-utilities-1.3.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.15 CPython/3.7.2 Darwin/18.6.0

File hashes

Hashes for aws-utilities-1.3.1.tar.gz
Algorithm Hash digest
SHA256 2f56c218eba265e45a40a26b74478a82c7f495d669f4603ea1c8b528b382a4f2
MD5 ba20cc465d025edf57fe7f4d7db11ce1
BLAKE2b-256 3b660785b37a70dd8b089fa8414bf701fe89daa5e58126ec8e21d7b973afbc34

See more details on using hashes here.

File details

Details for the file aws_utilities-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: aws_utilities-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.15 CPython/3.7.2 Darwin/18.6.0

File hashes

Hashes for aws_utilities-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57e39164e22530e9b1cd3b69e56bb25d4af860f20a0c78788368a7b3259b5f27
MD5 252b52c98466e49b4d2203feb86edf60
BLAKE2b-256 6465b3a58f25a590354be3d77b2908fe6d53cf6d3a9de3f367b7e991a228b2ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page