From aa58d7744eac8dd6c7f5465b8ea78e5956ba0c9f Mon Sep 17 00:00:00 2001 From: Deivison Lincoln Date: Mon, 6 May 2024 17:28:41 -0300 Subject: [PATCH] chore: update AWS SDK dependency to version 3.569.0 --- package.json | 2 +- src/api/integrations/sqs/libs/sqs.server.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 34321368f..7f9442e9f 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@hapi/boom": "^10.0.1", "@sentry/node": "^7.59.2", "amqplib": "^0.10.3", - "aws-sdk": "^2.1499.0", + "@aws-sdk/client-sqs": "^3.569.0", "axios": "^1.6.5", "baileys": "^6.7.1", "class-validator": "^0.14.1", diff --git a/src/api/integrations/sqs/libs/sqs.server.ts b/src/api/integrations/sqs/libs/sqs.server.ts index e1c328cb3..3dc1d95dd 100644 --- a/src/api/integrations/sqs/libs/sqs.server.ts +++ b/src/api/integrations/sqs/libs/sqs.server.ts @@ -1,4 +1,4 @@ -import { SQS } from 'aws-sdk'; +import { SQS } from '@aws-sdk/client-sqs'; import { configService, Sqs } from '../../../../config/env.config'; import { Logger } from '../../../../config/logger.config'; @@ -12,8 +12,11 @@ export const initSQS = () => { return new Promise((resolve, reject) => { const awsConfig = configService.get('SQS'); sqs = new SQS({ - accessKeyId: awsConfig.ACCESS_KEY_ID, - secretAccessKey: awsConfig.SECRET_ACCESS_KEY, + credentials: { + accessKeyId: awsConfig.ACCESS_KEY_ID, + secretAccessKey: awsConfig.SECRET_ACCESS_KEY, + }, + region: awsConfig.REGION, });