0

I'm trying to run tests against DynamoDB Local in CircleCI and they are silently failing and eventually timing out. There are no errors reported by the DocumentClient. What could be causing this issue?

redgeoff
  • 3,163
  • 1
  • 25
  • 39

1 Answers1

1

The solution was simple, but tough to find. You need to make sure to define the environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION. Or, you can define them in your options when calling new AWS.DynamoDB.DocumentClient().

For CircleCI, just include something like:

      - image: circleci/node:10-browsers
        environment:
          # The AWS vars are required or else the DynamoDB client will silently fail
          AWS_ACCESS_KEY_ID: FOO
          AWS_SECRET_ACCESS_KEY: FOO
          AWS_REGION: FOO
redgeoff
  • 3,163
  • 1
  • 25
  • 39
  • 2
    At the bottom of each AWS documentation page is a link to open a ticket for them to improve that page in the docs. Can you please submit one for this and what the change is so other benefit? – NoSQLKnowHow Apr 04 '19 at 19:12
  • var AWS = require('aws-sdk'); AWS.config.update({region: 'eu-west-2'}); AWS.config.update({access_key_id: 'xxxx'}); AWS.config.update({secret_access_key: 'yyyy'}); – tjheslin1 Oct 12 '19 at 13:15