explicitly set aws credentials from CDO config#7903
Merged
Conversation
| # Set AWS SDK environment variables from provided config. | ||
| ENV['AWS_ACCESS_KEY_ID'] ||= config['aws_access_key'] || config['s3_access_key_id'] | ||
| ENV['AWS_SECRET_ACCESS_KEY'] ||= config['aws_secret_key'] || config['s3_secret_access_key'] | ||
| # Set AWS SDK environment variables from provided config and standardize on aws_* attributres |
Contributor
Author
There was a problem hiding this comment.
I did this here so that I wouldn't have to repeat the aws_access_key || s3_access_key_id thing in the cloud_formation.rb code. I feel a bit weird about writing the config object, but we seem to do that all over the place here anyway...
Contributor
|
thanks for digging into this! Yeah, this should work for now. I'll look at refactoring setting these credentials explicitly like this to use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was encountering this error when trying to do
rake adhoc:startThe problem is that the cloudformation stuff was happening inside a block that resets the environment, so the AWS_ environment variables set in deployment.rb were being reset. Change to explicitly getting the config from CDO instead of using the environment.