trek10inc / awsume

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

AWSume not setting AWS_PROFILE env variable on Mac #140

Closed varun1231 closed 3 years ago

varun1231 commented 3 years ago

Running awsume profile-name isn't setting environment variable AWS_PROFILE and therefore, I am unable to use it directly with terraform. I have to export that variable separately. It does however set AWSUME_PROFILE. Seen below are debug logs as I ran the last awsume with --debug flag.

Screenshot 2021-03-29 at 13 17 28

And get the following error when trying to do awsume -a

Screenshot 2021-03-29 at 13 22 42

Note: Mac OSX version is Big Sur 11.2.3

bdurrani commented 3 years ago

I'm seeing the same issue. Using big sur 11.3 with awsume 4.5

bdurrani commented 3 years ago

Looks like I missed the step about setting up the alias. Once I added the alias, things started working https://awsu.me/general/quickstart.html#alias-setup

mbarneyjr commented 3 years ago

Yep, the alias should be setup in order to allow awsume to modify your current shell's environment variables. We recently released 4.5.1, which improves the awsume-configure command so that if you run it without any flags (so just awsume-configure), it'll try to set everything up for each shell you have installed based on sane defaults, so this could be used to help setup awsume if the installation process doesn't work right

Closing for now, but if you still experience issues please reopen this issue or open a new one, thanks!

Hobart2967 commented 9 months ago

+1, happens as of now. I ran "awsume profile" with everything set up correctly, still no AWS_PROFILE variable.