Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamo Error "ConfigError: Missing region in config" when developing Alexa skill locally

When developing and debugging Alexa skills locally using Bespoken Tools, the error occurs when connecting to Dynamo (using the Alexa Node.js SDK).

The error occurs within the Alexa SDK on the "get" call to Dynamo.

like image 606
John Kelvie Avatar asked Apr 19 '17 16:04

John Kelvie


1 Answers

This error occurs because the region set in the ~/.aws/config is not properly recognized by the Node.js SDK for AWS.

To work around this, just make an explicit call to configure the region, like so:

AWS.config.update({
    region: "us-east-1"
});

Be sure to call this before processing any events with the alexa-sdk, i.e., before calling alexa.execute().

like image 51
John Kelvie Avatar answered Sep 18 '22 18:09

John Kelvie