A wrapper for executing a command with AWS CLI v2 and SSO
Project description
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=linaro-its_aws2-wrap&metric=alert_status)](https://sonarcloud.io/dashboard?id=linaro-its_aws2-wrap)
# aws2-wrap This is a simple script to facilitate exporting the current AWS SSO credentials or runing a command with them. It is installed with pip.
## Run a command using AWS SSO credentials
aws2-wrap –profile <awsprofilename> –exec “<command>”
Note that you must enclose the command to be executed within double-quotes in order to ensure that any parameters are passed to that sub-command and not to aws2-wrap.
For example:
aws2-wrap –profile MySSOProfile –exec “terraform”
## Export the credentials
There may be circumstances when it is easier/better to set the appropriate environment variables so that they can be re-used by any aws command.
Since the script cannot directly set the environment variables in the calling shell process, it is necessary to use the following syntax:
eval “$(aws2-wrap –profile <awsprofilename> –export)”
For example:
eval “$(aws2-wrap –profile MySSOProfile –export)”
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for aws2_wrap-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1484155e9d028f63f5721e283457a43457fbdfe2e11c8a9bce936e652ac8e112 |
|
MD5 | b31704b93d5b6d3d6dd433c5ecfdf0ad |
|
BLAKE2b-256 | 1903d0ce66869e86aeaa05238d46e2601e095f5cd47087810aafce82ffe3b035 |