I am building a rails application and I am using dynamoDB as the database (using dynamoid). While I am running the tests, I get the following error:
Aws::Errors::MissingCredentialsError:unable to sign request without credentials set
Since tests are run in the local dynamoDB, I am a little confused over this error message. Is it that my tests are not running in local db and they are trying to access the remote db?
You can use the below configuration for local dynamodb. When you give the localhost endpoint, the dynamodb uses the endpoint directly rather than deriving the endpoint from region.
Aws.config.update({
region: 'us-west-2',
credentials: Aws::Credentials.new('akid', 'secret'),
endpoint:'http://localhost:8000'
})
The region is used to construct an SSL endpoint. If you need to connect to a non-standard endpoint, you may specify the :endpoint option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With