onelogin-aws-cli
onelogin-aws-cli copied to clipboard
Generate role_arn in ~/.aws/credentials file
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.