I'm trying to get to the point where my ~/.aws/credentials file looks like this:
[production]
aws_access_key_id = [REDACTED]
aws_secret_access_key = [REDACTED]
aws_session_token = [REDACTED]
[sandbox]
role_arn = arn:aws:iam::123456789123:role/SandboxAdmin
source_profile = production
Of course running onelogin-aws-login -C production will generate the appropriate credentials just fine, but how do I go about generating the second part? If I add the role_arn inside the ~/.onelogin-aws.config file, it still prompts for a OTP which defeats the point.
Currently trying to hack it into the save_credentials function inside __init__.py.
I'm trying to get to the point where my
~/.aws/credentialsfile looks like this:Of course running
onelogin-aws-login -C productionwill generate the appropriate credentials just fine, but how do I go about generating the second part? If I add therole_arninside the~/.onelogin-aws.configfile, it still prompts for a OTP which defeats the point.Currently trying to hack it into the
save_credentialsfunction inside__init__.py.