Skip to content

Commit 923339a

Browse files
committed
fix(aws): adjust credentials
1 parent 5791ddd commit 923339a

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenna/queue",
3-
"version": "5.14.0",
3+
"version": "5.15.0",
44
"description": "The Athenna queue handler.",
55
"license": "MIT",
66
"author": "João Lenon <[email protected]>",

src/drivers/AwsSqsDriver.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,20 @@ export class AwsSqsDriver extends Driver<SQSClient> {
142142
}
143143

144144
let sqsClientOptions: any = {
145-
region: this.region,
146-
credentials: {
147-
accessKeyId: this.awsAccessKeyId,
148-
secretAccessKey: this.awsSecretAccessKey
149-
}
150-
}
145+
region: this.region,
146+
credentials: {
147+
accessKeyId: this.awsAccessKeyId,
148+
secretAccessKey: this.awsSecretAccessKey
149+
}
150+
}
151151

152152
/**
153153
* If the AWS_SESSION_TOKEN is set, it means that the session is running inside
154154
* AWS. In this case, we can't set any options to SQSClient, otherwise the client
155155
* will fail to authenticate.
156156
*/
157-
if (Env('AWS_SESSION_TOKEN')) {
158-
sqsClientOptions = {}
157+
if (Is.Undefined(this.awsAccessKeyId) || Env('AWS_SESSION_TOKEN')) {
158+
sqsClientOptions = {}
159159
}
160160

161161
this.client = new SQSClient(sqsClientOptions)

0 commit comments

Comments
 (0)