From 2c0661a90515acf5ab8a643537303ceb3f9ba80e Mon Sep 17 00:00:00 2001 From: John Taylor Date: Thu, 3 Mar 2022 21:52:07 -0500 Subject: [PATCH] add more verbose errors --- sns_publish.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sns_publish.go b/sns_publish.go index abb9c6e..ba0c9b6 100644 --- a/sns_publish.go +++ b/sns_publish.go @@ -22,7 +22,7 @@ import ( "os" ) -const pgmVersion string = "1.0.3" +const pgmVersion string = "1.0.4" const pgmUrl string = "https://github.com/jftuga/sns_publish" func main() { @@ -37,7 +37,7 @@ func main() { fmt.Println(pgmUrl) fmt.Println("") fmt.Println("You must supply a subject, message and a topic ARN.") - fmt.Println("Your default AWS credentials must have permission to publish messages to the given topic.") + fmt.Println("You can optionally pass -p to use a profile other than the default.") fmt.Println("") fmt.Println("Usage: sns_publish -p PROFILE -s SUBJECT -m MESSAGE -t TOPIC-ARN") os.Exit(1) @@ -56,7 +56,8 @@ func main() { sess, err := session.NewSessionWithOptions(session.Options{ Profile: *profilePtr, Config: aws.Config{ - Region: aws.String(region), + Region: aws.String(region), + CredentialsChainVerboseErrors: aws.Bool(true), }, }) if err != nil {