aws iot describe-endpoint ::您必须指定一个区域

时间:2016-03-06 04:19:18

标签: amazon-web-services aws-sdk iot aws-cli aws-iot

我正在关注this tutorial使用Node.js SDK将Raspberry Pi连接到AWS IoT,我已完成所有其他步骤,但我在身份验证和证书步骤中丢失了:

pi@raspberrypi:~ $ aws iot describe-endpoint
You must specify a region. You can also configure your region by running "aws configure".
pi@raspberrypi:~ $ aws configure
AWS Access Key ID [None]: 
AWS Secret Access Key [None]: 
Default region name [None]: 
Default output format [None]: 
pi@raspberrypi:~ $ ls
2016-02-24-204612_1920x1080_scrot.png  Desktop     get-pip.py           node_modules  python_games             sources    WiringPi
aws                                    device.cfg  ibm                  Pictures      python-iot-raspberry-pi  Templates
aws-iot-device-sdk-js                  Documents   iot_1.0-1_armhf.deb  projects      root                     Videos
certs                                  Downloads   Music                Public        root.pem                 wiringPi

pi@raspberrypi:~ $ cd certs/
pi@raspberrypi:~/certs $ ls
1cf77402f9-certificate.pem.crt  1cf77402f9-private.pem.key  1cf77402f9-public.pem.key

当我浏览https://A34SXNTM6AT7XH.iot.us-west-2.amazonaws.com/things/MyNewThing/shadowhttps://A34SXNTM6AT7XH.iot.us-west-2.amazonaws.com时,我看到Missing Authentication Token消息: enter image description here

我不知道如何使最后一步工作,所以当我浏览它们时,我可以在URL中看到内容。有人可以帮我弄清楚我缺少哪些步骤或教程中缺少哪些步骤? enter image description here

1 个答案:

答案 0 :(得分:3)

这解决了问题:

  • 浏览至 https://console.aws.amazon.com/iam/home?region=us-west-2#security_credential 然后,如果您没有按键,请单击“创建新的访问密钥” 如果你已经拥有它保存信息并在前面输入 aws configure命令的条目以及区域选择的条目 “us-west-2”是您在仪表板中选择的俄勒冈州。
  • 之后,您将能够看到以下凭证: AWS凭证文件 - 位于Linux,OS上的~/.aws/credentials X或Unix