Created
October 6, 2016 23:36
-
-
Save daleki/b1d176902bdce94de3a8e5abf900c682 to your computer and use it in GitHub Desktop.
Check AWS Go SDK credentials
This file contains 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
//Check if credentials have been found | |
//https://github.com/aws/aws-sdk-go/issues/579 | |
_, err := session.Config.Credentials.Get() | |
if err != nil { | |
log.Fatalf("ERROR: Unable to load credentials. Check ~/.aws/credentials or IAM instance profile. \n%s\n", err.Error()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment