trek10inc / awsume

A utility for easily assuming AWS IAM roles from the command line.
https://awsu.me
MIT License
494 stars 90 forks source link

Provide a way to display current role in command prompt #31

Closed jangroth closed 6 years ago

jangroth commented 6 years ago

Awesome piece of software, loving it!

It would be great if there was a way to query awsume for the current profile, so that this information could be used elsewhere (e.g. to display the current role in the shell command prompt).

Or is this already possible and I'm missing it from the documentation?

mbarneyjr commented 6 years ago

When you awsume a profile, the name of that profile is exported to the AWSUME_PROFILE environment variable.

So if you were to run awsume client-dev, the value of that environment variable would be "client-dev", if the command executed successfully.

This isn't explicitly defined in the documentation, but I will be sure to add it in the wiki!

We're glad you're enjoying it, if you have any other tips or suggestions we're always open to feedback!

jangroth commented 6 years ago

Thanks, that's great!