The tests are passing in my local environment and my code is working as expected in production (AWS lambda). Sadly, the tests are failing on CI (GitHub Actions):
FAIL src/utils.test.js
● getQueryParamsFromEvent › should mount parameters from a well formed event
CredentialsProviderError: Could not load credentials from any providers
at providers (node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js:25:19)
at node_modules/@aws-sdk/property-provider/dist-cjs/chain.js:11:28
at coalesceProvider (node_modules/@aws-sdk/property-provider/dist-cjs/memoize.js:13:24)
at SignatureV4.credentialProvider (node_modules/@aws-sdk/property-provider/dist-cjs/memoize.js:32:24)
at SignatureV4.signRequest (node_modules/@aws-sdk/signature-v4/dist-cjs/SignatureV4.js:84:29)
at node_modules/@aws-sdk/middleware-signing/dist-cjs/middleware.js:13:18
at StandardRetryStrategy.retry (node_modules/@aws-sdk/middleware-retry/dist-cjs/StandardRetryStrategy.js:51:46)
at node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:6:22
at async Promise.all (index 0)
My workflow is correctly setting up the environment variables:
I'm using
jest-dynalite
to test my DynamoDB operations. This is the code I'm using to initialize the client.The tests are passing in my local environment and my code is working as expected in production (AWS lambda). Sadly, the tests are failing on CI (GitHub Actions):
My workflow is correctly setting up the environment variables:
Are there any additional steps for this to work? Thanks for your help.