Error: dynamodb botocore.exceptions.nocredentialserror unable to locate credentials

Rafal Wilinski

Answered by Rafal Wilinski

What's Causing This Error

You may run into this error when the AWS SDK cannot locate your AWS credentials (AWS Access Key and Secret Access Key).

Solution: Here's How To Resolve It

There is no well-defined way to solve the error. However, you can try the following to see which works for you.

  1. Ensure that your AWS credentials (access key and secret key) are set up correctly and have the correct permissions to access DynamoDB and execute the operation you wish to perform.
  2. You can also check the credentials file (usually located at ~/.aws/credentials) to ensure that it contains the correct access and secret keys.
  3. If you are running your application on an EC2 instance or Lambda, you can also check that the IAM Role attached to the service has an identity-based policy that allows it to access DynamoDB.
  4. Ensure that the region you are trying to access DynamoDB is the same as the region in which the credentials are created.
  5. Make sure that the certificates you are using are not expired.

Tired of AWS Console? Try Dynobase.

Try 7-day free trial. No strings attached.

Product Features

Member Portal
© 2024 Dynobase
Using DynamoDB Console frequently?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.