Goamz bug?

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Sun Dec 4 13:16:32 UTC 2011


Hi Zuocheng,

> I am using goamz to access amazon s3 in my project.
> I used to aws.EnvAuth() to load the credentials stored as environment
> variables.
> However, when I changed the environment variables in .bash_profile, it seems
> that was.EnvAuth() is reading some cached staled version of the credential.
> I have to restart the terminal to make the change to the credentials take
> effect.

That's how your .bash_profile works. The environments are read onto
the bash process at the time it starts, so it's unrelated to goamz in
that regard. You can set the variables manually in your terminal for
it to work (please don't forget to "export" them), and you can also
source your .bash_profile explicitly by saying "source
~/.bash_profile".

-- 
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog

-- I'm not absolutely sure of anything.



More information about the Juju mailing list