Skip to content

Commit

Permalink
add more verbose errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jftuga committed Mar 4, 2022
1 parent ffed6f2 commit 2c0661a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sns_publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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)
Expand All @@ -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 {
Expand Down

0 comments on commit 2c0661a

Please sign in to comment.