AWS integration - switching roles via CLI Skip to main content
https://support.okta.com/help/answers?id=906f0000000dfcriao&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Thomas ChilcuttThomas Chilcutt 

AWS integration - switching roles via CLI

Has anyone else successfully performed/completed the AWS + Okta integration and figured out how to switch roles using the CLI?  I have successfully followed the integration guide published by Okta, and also integrated use of the CLI (https://support.okta.com/help/articles/Knowledge_Article/Integrating-the-Amazon-Web-Services-Command-Line-Interface-Using-Okta), but I am having trouble figuring out how to then successfully switch roles via the CLI.  Thanks.
Raphael LondnerRaphael Londner (Okta, Inc.)
Hi Tom,

You don't really need to switch roles and you should be able to use the CLI as if you already was using that role (check the ./aws/credentials file to verify this).

The assumption though is that your cross-account role set up in your "Identity" account is mapped to only one single role in the target account, because our tool will only take the first role mapped to your cross-account role and add an entry for it in the credentials file.

Does this make sense? Don't hesitate to contact us directly at developers at okta dot com if you need further explanation.