aws-lambdaaws-sdkaws-sdk-jsaws-sdk-js-v3

aws-sdk v3 lambda region missing even after providing region


I'm migrating aws-sdk from v2 to v3 and I'm having trouble setting up the lambda client. I'm providing region during the instantiation of lambda client as shown in the docs but while running InvokeAsyncCommand on the client, I get "Region is missing" error.

The sandbox contains the issue reproduced

https://codesandbox.io/s/xenodochial-robinson-ljqfo


Solution

  • Adding clientConfig: {region: "region-here"} in fromCognitoIdentityPool solved the issue. I've left the code sandbox unedited for reference.