本文介绍了Dynamo错误"ConfigError:配置中缺少区域"在本地开发Alexa技能时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Bespoken工具在本地开发和调试Alexa技能时,在连接到Dynamo时会发生错误(使用 Alexa Node.js SDK ).

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

该错误发生在获得"对Dynamo的呼叫.

推荐答案

之所以会发生此错误,是因为Node.js SDK无法正确识别〜/.aws/config 中设置的区域.AWS.

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"
});

请确保在使用alexa-sdk处理任何事件之前调用此函数,即,在调用 alexa.execute()之前.

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

这篇关于Dynamo错误"ConfigError:配置中缺少区域"在本地开发Alexa技能时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 11:12