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

Remove explicit call to use credentials from environment variables #175

Merged
merged 3 commits into from
Jan 25, 2019

Conversation

katrogan
Copy link
Contributor

For background, we run our application in a k8s container with an AWS role with SQS & SNS permissions already configured. We've been using a gizmo fork that doesn't configure credentials without trouble for the last few months.

@coveralls
Copy link

coveralls commented Jan 24, 2019

Coverage Status

Coverage increased (+0.07%) to 45.822% when pulling b943652 on katrogan:role-based-creds into 95e6953 on NYTimes:master.

pubsub/aws/aws.go Outdated Show resolved Hide resolved
@katrogan katrogan changed the title Add option to use default credentials Remove explicit call to use credentials from environment variables Jan 25, 2019
Region: &cfg.Region,
Endpoint: cfg.EndpointURL,
}
if creds != nil {
Copy link
Contributor

@jprobinson jprobinson Jan 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If creds is already nil then setting it into a nil awsConfig.Credentials as nil won't have any effect. With that in mind, I think we can drop this if statement and use the prior, 1 liner for sns.New, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wasn't clear before, but that's what I meant: dropping the else block should be the only change needed in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, done

Copy link
Contributor

@jprobinson jprobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️! 🌯!

@jprobinson jprobinson merged commit b3a5760 into nytimes:master Jan 25, 2019
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

Successfully merging this pull request may close these issues.

5 participants