Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS environment variables and fallback credentials #4

Closed
gitfool opened this issue Apr 11, 2016 · 2 comments
Closed

AWS environment variables and fallback credentials #4

gitfool opened this issue Apr 11, 2016 · 2 comments

Comments

@gitfool
Copy link
Contributor

gitfool commented Apr 11, 2016

This is a very useful addin for Cake, thanks! 😉

One problem I hit was that the AWS environment variables used by CakeEnvironmentExtensions don't match what's used by the AWS SDK:

Was this a deliberate choice to differentiate them from the fallback credentials used by the SDK?

Normally I use the ctors which leverage the FallbackCredentialsFactory:

... which gives you a few ways to automatically inject the credentials - via an instance profile when running inside AWS or via the standard environment variables when running outside AWS.

Not a major problem obviously, but it does require more setup than expected for the common case, so this addin should ideally use the same standard conventions already established by the AWS SDK.

@SharpeRAD
Copy link
Owner

Sorry for the delay in replying I was out of the country with limited access to the internet. I can't argue with your logic so I've updated all of my AWS addins to use the SDK naming convention 😄

@gitfool
Copy link
Contributor Author

gitfool commented Apr 29, 2016

Thanks @SharpeRAD.

FWIW, here is FallbackCredentialsFactory which has more flexible options for specifying AWS credentials, including via environment variables or instance profiles, the latter of which is the recommended approach when running from inside AWS. I don't need this right now, but I'm sure others will be doing builds on EC2 instances...

In order to leverage this you'd need to use the other ctors for any Amazon clients, although I just noticed that FallbackCredentialsFactory is public, so another way might be to call FallbackCredentialsFactory.GetCredentials() directly if you need more control?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants