Skip to main content

pypyr task runner AWS plugin. Automate services like ECS, S3, Beanstalk & EC2 with automation pipelines without writing having to write code.

Project description

pypyr aws plug-in

pypyr task runner for automation pipelines

Run anything on aws. No really, anything! If the aws api supports it, the pypyr aws plug-in supports it.

It's a pretty easy way of invoking the aws api as a step in a series of steps without having to write code.

pypyr is a cli & api to run pipelines defined in yaml.

All documentation for the pypyr aws plugin is here:

Why use this when you could just use the aws-cli instead? The aws cli is all kinds of awesome, but I find more often than not it's not just one or two aws ad hoc cli or aws api methods you have to execute, but especially when automating and scripting you actually need to run a sequence of commands, where the output of a previous command influences what you pass to the next command.

Sure, you can bash it up, and I do that too, but running it as a pipeline via pypyr has actually made my life quite a bit easier because of not having to deal with conditionals, error traps and input validation.

build status coverage statuspypi version apache 2.0 license


$ pip install --upgrade pypyraws

pypyraws depends on the pypyr core. The above pip will install it for you if you don't have it already.


Here is some sample yaml of what a pipeline using the pypyr-aws plug-in to upload a file to s3 would look like:

context_parser: pypyr.parser.keyvaluepairs
  - name: pypyraws.steps.client
    description: upload a file to s3
        serviceName: s3
        methodName: upload_file
          Filename: ./testfiles/arb.txt
          Bucket: '{bucket}'
          Key: arb.txt

If you saved this yaml as ./pipelines/go-go-s3.yaml, you can run it like this to upload arb.txt to your specified bucket:

$ pypyr go-go-s3 bucket=myuniquebucketname

custom waiters

But wait, there's more! You can make a custom waiter for any aws client operation and wait for a specified field in the response to become the value you want it to be.

This is especially handy for things like Beanstalk, because Elastic Beanstalk does not have Waiters for environment creation.

The input context looks like this:

  awsClientIn: # required. awsClientIn allows the same arguments as pypyraws.steps.client.
    serviceName: elasticbeanstalk
    methodName: describe_environments
        ApplicationName: my wonderful beanstalk default application
          - my-wonderful-environment
        VersionLabel: v0.1
  waitForField: '{Environments[0][Status]}' # required. format expression for field name to check in awsClient response
  toBe: Ready # required. Stop waiting when waitForField equals this value
  pollInterval: 30 # optional. Seconds to wait between polling attempts. Defaults to 30 if not specified.
  maxAttempts: 10 # optional. Defaults to 10 if not specified.
  errorOnWaitTimeout: True # optional. Defaults to True if not specified. Stop processing if maxAttempts exhausted without reaching toBe value.


Don't Panic! Check the pypyraws technical docs to begin. For help, community & talk, check pypyr twitter, or join the chat at the pypyr community discussion forum!



For information on how to help with pypyr, run tests and coverage, please do check out the pypyr contribution guide.


Well, you know. No one's perfect. Feel free to create an issue.


pypyr is free & open-source software distributed under the Apache 2.0 License.

Please see LICENSE in the root of the repo.

Copyright 2017 the pypyr contributors.

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

pypyraws-1.3.0.tar.gz (18.6 kB view hashes)

Uploaded source

Built Distribution

pypyraws-1.3.0-py3-none-any.whl (20.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page