Merge pull request #583 from deivisonrpg/chore-update-aws-sdk-v3

chore(aws sqs): update aws sdk v3
This commit is contained in:
Davidson Gomes 2024-05-08 09:56:24 -03:00 committed by GitHub
commit 11cf947bbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -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.2",
"class-validator": "^0.14.1",

View File

@ -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<void>((resolve, reject) => {
const awsConfig = configService.get<Sqs>('SQS');
sqs = new SQS({
credentials: {
accessKeyId: awsConfig.ACCESS_KEY_ID,
secretAccessKey: awsConfig.SECRET_ACCESS_KEY,
},
region: awsConfig.REGION,
});