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.

Neville
asked 9 months ago6165 views
2 Answers
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
answered 9 months ago
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

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions