Package: pypyraws
pypyr aws plug-inRun 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.pypyris a cli & api to run pipelines
defined in yaml.All documentation for the pypyr aws plugin is here:https://pypyr.io/docs/plugins/aws/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 awsad hoccli 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.installation$pipinstall--upgradepypyrawspypyrawsdepends on the pypyr core. The abovepipwill install it
for you if you don't have it already.usageHere 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.keyvaluepairssteps:-name:pypyraws.steps.clientdescription:upload a file to s3in:awsClientIn:serviceName:s3methodName:upload_filemethodArgs:Filename:./testfiles/arb.txtBucket:'{bucket}'Key:arb.txtIf you saved this yaml as./pipelines/go-go-s3.yaml, you can run it like this
to uploadarb.txtto your specified bucket:$pypyrgo-go-s3bucket=myuniquebucketnamecustom waitersBut 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:awsWaitFor:awsClientIn:# required. awsClientIn allows the same arguments as pypyraws.steps.client.serviceName:elasticbeanstalkmethodName:describe_environmentsmethodArgs:ApplicationName:my wonderful beanstalk default applicationEnvironmentNames:-my-wonderful-environmentVersionLabel:v0.1waitForField:'{Environments[0][Status]}'# required. format expression for field name to check in awsClient responsetoBe:Ready# required. Stop waiting when waitForField equals this valuepollInterval: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.Help!Don't Panic! Check thepypyraws technical docsto begin.
For help, community & talk, checkpypyr twitter, or join the chat at thepypyr community discussion forum!contributedevelopersFor information on how to help with pypyr, run tests and coverage,
please do check out thepypyr contribution
guide.bugsWell, you know. No one's perfect. Feel free tocreate an
issue.Licensepypyr is free & open-source software distributed under the Apache 2.0 License.Please seeLICENSEin the root of the repo.Copyright 2017 the pypyr contributors.