aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

SignatureDoesNotMatch

Open VincentSurelle opened this issue 8 months ago • 2 comments

Checkboxes for prior research

Describe the bug

Hello,

Following the issue #5192 and the workaround provided by @trivikr

If I take this case :

// ...
const client = new SSM();
const secret = client.getSecretValue(params); // Don't want to await there since it will extends my cold start time

const handler = async (event) => {
  // Do some stuff
  // More stuff that can take some time
  // Now I need it so I can await it
  doSomethingWithMySecret(await secret); // Perfect timing, there's more chances that my Promise is already resolved
}

Is this still possible with SDK v3 ?

Thanks :)

SDK version number

v3

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

20

Reproduction Steps

const client = new SSM();
const secret = client.getSecretValue(params); // Don't want to await there since it will extends my cold start time

const handler = async (event) => {
  // Do some stuff
  // More stuff that can take some time
  // Now I need it so I can await it
  doSomethingWithMySecret(await secret); // Perfect timing, there's more chances that my Promise is already resolved
}

Observed Behavior

An SignatureDoesNotMatch Error is throwed sometimes (Auto Provisioning)

Expected Behavior

No error

Possible Solution

No response

Additional Information/Context

No response

VincentSurelle avatar Jun 05 '24 09:06 VincentSurelle