aws-sso-cred-restore
This is script is inspired from aws2-wrap and solve problem with old sdk's like aws-sdk-go and turn safe our
work with tools like terraform.
the problem
Work with terraform is more safe if we use only profile configuration and work with workspaces feature.
provider "aws" {
profile = "${terraform.env}"
region = "${var.region}"
}
But aws sso cli command cannot configure credentials file, and aws-sdk-go cannot work with new model of profile config.
Using environment variables, the configuration overwrite profile option on provider block on terraform, and this is dangerous.
This wrapper solve temporary (hello aws and hashicorp, solve this plis!!) this problem.
Install using pip
https://pypi.org/project/aws-sso-cred-restore
pip install aws-sso-cred-restore==<VERSION>
Run a command using AWS SSO credentials
aws-sso-cred-restore --profile <awsprofilename-or-prefix>
or run to all profiles in your config
aws-sso-cred-restore
This command will get credentials using active aws sso access key section file
and restore in ~/.aws/credentials
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 "$(aws-sso-cred-restore --profile <awsprofilename-or-prefix> --export)"
Metadata
Release files for aws-sso-cred-restore 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aws-sso-cred-restore-1.2.0.tar.gz | 4.5 kB | Without provenance | Details for aws-sso-cred-restore-1.2.0.tar.gz |
Release files / aws-sso-cred-restore-1.2.0.tar.gz
| Download URL | aws-sso-cred-restore-1.2.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
022f30fc3ae1b948934813764c05135d6aa8fafd77cb9cdad01f4ca35e0f1ae7
|
|
BLAKE2b-256 checksum How to use checksums |
4e014998f107120459eb8e63f9eeacd8dbc42bb6c54f9a0b59cb7711886da53d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
|
Security for aws-sso-cred-restore 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.