Skip to content

Commit

Permalink
Merge pull request #19 from mlarraz/session
Browse files Browse the repository at this point in the history
Stop using deprecated aws function
  • Loading branch information
rnubel authored Nov 1, 2022
2 parents c03e9cb + f2be5c8 commit 410409f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sqs_client.go
Original file line number Diff line number Diff line change
@@ -33,7 +33,11 @@ type sdkClient struct {
// NewAWSSQSClient creates an SQS client that talks to AWS on the given queue
func NewAWSSQSClient(conf AWSConfig, queueName string) (SQSClient, error) {
creds := credentials.NewStaticCredentials(conf.AccessKey, conf.SecretKey, "")
sess := session.New(&aws.Config{Region: formatRegion(conf.Region), Credentials: creds})
sess, err := session.NewSession(&aws.Config{Region: formatRegion(conf.Region), Credentials: creds})

if err != nil {
return nil, err
}

client := new(sdkClient)
client.service = sqs.New(sess)

0 comments on commit 410409f

Please sign in to comment.