Skip to content

Commit

Permalink
refactor: remove unnecessary config and add AWS.Endpoint parser
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbrunelli committed Aug 8, 2021
1 parent 9fa46c3 commit 84bce57
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions handler.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
const AWS = require('aws-sdk')

AWS.config.update({
region: process.env.REGION
})

const sqs = new AWS.SQS({
endpoint: new AWS.Endpoint(process.env.ELASTICMQ_URL),
accessKeyId: process.env.ACCESS_KEY_ID,
secretAccessKey: process.env.SECRET_ACCESS_KEY
region: process.env.REGION
})

exports.producer = async (event) => {
Expand Down

0 comments on commit 84bce57

Please sign in to comment.