Looking to Resolve Error: Resolved credential object is not valid

0

I am relatively a newbie who is looking to use Amazon SES in my node application for a few use cases. In that regard my first use case - send reset password email , I am encountering the above said error.

My application use: Development IDE: VS Code Node Version: 18.16 AWS Library used: @aws-sdk/client-ses

I double and triple checked my environment variables, any typos or any code error to the best of my abilities. But cannot find it. Following is the error log which is generated in the terminal:

Error: Resolved credential object is not valid at SignatureV4.validateResolvedCredentials (C:\Users.....\myapp\v-1\node_modules@smithy\signature-v4\dist-cjs\SignatureV4.js:182:19) at SignatureV4.signRequest (C:\Users.....\myapp\v-1\node_modules@smithy\signature-v4\dist-cjs\SignatureV4.js:107:14) { '$metadata': { attempts: 1, totalRetryDelay: 0 } }

I also checked whether my env variables regarding SES (AWS_ACCESS_KEY, AWS_ACCESS_SECRET_KEY, AWS_REGION and AWS_SES_SENDER) which have AWS access key, secret, region and Sender email are being read correctly.

I tried using Google and YouTube without getting any definitive results. Even the Chat GPT is not giving clear answers on resolving this issue. I even created a new set of credentials, created new IAM user(and gave it full control in relation to SES) , but even then the error is still present.

Looking for experienced developers and users to provide a guiding path in resolving this issue.

  • Did you find a solution? I am facing a similar problem.

2개 답변
0

In my specific case, I went through this checklist:

  1. Checking for my code for any errors or typos
  2. Checking for any missing library
  3. Rebooting the system/restarting IDE.
  4. Creating a bare bones example of the same part of the code i was having trouble
  5. Copying the code(after finding it to be correct) to another system

What i did find was that although my code was working fine in the bare bones example, it was not in my project. So #1 and #2 were not the reason. But after I accidentally removed the package.json file, and had to recreate it, my code worked out all fine.

My solution that worked :

  • Step1. Backing up my code and project files
  • Step2. Deleting the package.json file and node modules directory
  • Step3. Reinstalling/ re-importing all the libraries

@myon - Don't know if my solution will work for you, but do try it and share the results. Hope this post helps out a fellow learner/newbie

Sincerely Neville

Neville
답변함 9달 전
0

I just configure my credentials like this: const SES_CONFIG ={ accessKeyId: process.env.AWS_ACCESS_KEY, secretAccesskey: process.env.AWS_SECRET_ACCESS_KEY, region: process.env.AWS_SES_REGION };

This worked for me

답변함 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠