1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Hi Utsab,
this might be related to a change in behavior with the AWS SDK v3. A similar issue is documented in this GitHub issue: https://github.com/aws/aws-sdk-js-v3/issues/4867
Could you maybe share the relevant code parts of your Lambda function to help narrow this down?
Thanks, Ben
Contenus pertinents
- demandé il y a un an
- demandé il y a 7 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
Hi Ben, thank you for your prompt response.
As I mentioned earlier, the Lambda function is quite straightforward. It simply retrieves a JSON file from an S3 bucket and returns the corresponding JSON response.
Thanks for sharing the code. Is there a particular reason why you need the credentials explicitly? You can just create the S3 Client without additional configuration. See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html for
Please be also aware that as per documentation https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html, you normally don't need to use
fromNodeProviderChain
explicitly:Appreciate the detailed explanation! I initially faced issues with the default configuration of the S3 client, resulting in
Could not load credentials from any providers
error. To address this, I addedfromNodeProviderChain
as a precautionary measure. Interestingly, it didn't resolve the issue either.Hi, thanks for the quick response. Have you tried using the
@aws-sdk/credential-provider-node
instead. See also the comment on this question: https://repost.aws/questions/QUXMX9z9zCSb21qsnedFZQpg/having-trouble-converting-aws-node-sdk-v2-lambda-to-v3Tried using the
@aws-sdk/credential-provider-node
as well. Still getting the same error