aws iot describe-endpoint::You must specify a region
Asked Answered
S

1

2

I am following this tutorial for connecting Raspberry Pi to AWS IoT using Node.js SDK and I have done all the other steps but I am lost in the authentication and certificate step:

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

When I browse to https://A34SXNTM6AT7XH.iot.us-west-2.amazonaws.com/things/MyNewThing/shadow or https://A34SXNTM6AT7XH.iot.us-west-2.amazonaws.com I see Missing Authentication Token message: enter image description here

I am not sure how to get the last step working so I could see stuff in the URLs when I browse to them. Can someone help me figure which steps I am missing or is missing from the tutorial? enter image description here

Salas answered 6/3, 2016 at 4:19 Comment(0)
S
3

This fixed the problem:

  • Browse to https://console.aws.amazon.com/iam/home?region=us-west-2#security_credential and then if you don’t have a key click on create new access key and if you already have it save the information and enter it in front of entries of aws configure command and also for region select “us-west-2” is Oregon is selected in your dashboard.
  • After that you will be able to see the credential in the following: The AWS credentials file – located at ~/.aws/credentials on Linux, OS X, or Unix
Salas answered 6/3, 2016 at 4:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.