Command to generate credentials for aws-cli when you have SAML authentication with JumpCloud.
The credentials will be stored in $HOME/.aws/credentials
.
Source : https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth.py
Referenced from : https://aws.amazon.com/blogs/security/how-to-implement-a-general-solution-for-federated-apicli-access-using-saml-2-0
- python 3.6
- pip
- awscli
pip3 install git+git://github.com/synaptic-cl/jumpcloud_aws.git@v0.1.5#egg=jumpcloud_aws
If you want to use Docker instead, see the "Use With Docker" section below.
pip3 install git+git://github.com/synaptic-cl/jumpcloud_aws.git@v0.1.5#egg=jumpcloud_aws --upgrade
jumpcloud_aws
# or add params
jumpcloud_aws --email [EMAIL] --password [PASSWORD] --region 0
for know the available regions:
jumpcloud_aws --help
# Build
docker build -t saml .
# Run
docker run --rm -it -v $(pwd)/jumpcloud_aws:/src/jumpcloud_aws -v $HOME/.aws/credentials:/root/.aws/credentials saml
- Docker > 18.03
# Build
docker build -t saml .
# Run
docker run --rm -it -v $(pwd)/jumpcloud_aws:/src/jumpcloud_aws -v $HOME/.aws/credentials:/root/.aws/credentials saml
- Tests
- Add validation when the selected region doesn't exist