rubyonjets/dynomite

Seems it's impossible to work with dynamodb locally on Jets

Closed this issue · 0 comments

Please, refer to (there is a temporary fix)
https://community.rubyonjets.com/t/error-the-security-token-included-in-the-request-is-invalid/388/4

Short brief

If we look here: https://github.com/tongueroo/dynomite/blob/master/lib/dynomite/db_config.rb#L35

There are no AWS credentials passed to, so in Jets config/application.rb I've put this to work with local dynamodb as a temporary fix

if ENV['DYNAMODB_LOCAL']
  Dynomite::Item.db = Aws::DynamoDB::Client.new(
    access_key_id: 'FakeAccessKeyID',
    secret_access_key: 'FakeSecretAccessKEY',
    endpoint: 'http://localhost:8000'
  )
end