Add verbose messaging for aws/sqs

This commit is contained in:
tidwall 2019-03-17 18:40:34 -07:00
parent bb6ff9e737
commit 7e006af713
1 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@ import (
"github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sqs" "github.com/aws/aws-sdk-go/service/sqs"
"github.com/streadway/amqp" "github.com/streadway/amqp"
"github.com/tidwall/tile38/internal/log"
) )
var errCreateQueue = errors.New("Error while creating queue") var errCreateQueue = errors.New("Error while creating queue")
@ -88,6 +89,7 @@ func (conn *SQSConn) Send(msg string) error {
sess := session.Must(session.NewSession(&aws.Config{ sess := session.Must(session.NewSession(&aws.Config{
Region: &region, Region: &region,
Credentials: creds, Credentials: creds,
CredentialsChainVerboseErrors: aws.Bool(log.Level >= 3),
MaxRetries: aws.Int(5), MaxRetries: aws.Int(5),
})) }))
svc := sqs.New(sess) svc := sqs.New(sess)