# Amazon FreeRTOS Configuration issue with ESP32 DevKitC

**URL:** <https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918>\
**Category:** AWS\
**Created:** [May 28, 2019, 8:35pm UTC](https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918 "2019-05-28T20:35:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 28, 2019, 8:35pm UTC](https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918/1 "2019-05-28T20:35:24Z")

</div>

**[KV\_KP](https://forums.aws.amazon.com/profile.jspa?userID=484313)** wrote on May 28, 2019:

While configuring, I have done the following:

1. using mingw32.exe, verified that I have Python 2.7.15

2. performed the _easy\_intall awscli_

3. ran _aws configure_ with my id and keys.

4. installed boto3 with _easy\_install boto 3_

5. updated the configure.json file’s attributes:  
{  
“afr\_source\_dir”:“C:/Users/KV/Desktop/AWS\_eval/amazon-freertos-master”,  
“thing\_name”:“KV\_ESP32\_thing”,  
“wifi\_ssid”:“xxxx”,  
“wifi\_password”:“xxxx”,  
“wifi\_security”:“WPA2”  
}  
//note- for ssid and password, i don’t have xxxx in my actual file. I have my actual ssid and password.

6. Now I was trying to run the _python SetupAWS.py setup_ from mingw32 shell but got the below error:  
======================  
$ python SetupAWS.py setup  
Traceback (most recent call last):  
File “SetupAWS.py”, line 205, in   
setup()  
File “SetupAWS.py”, line 157, in setup  
prereq()  
File “SetupAWS.py”, line 27, in prereq  
if not thing\_obj.create():  
File “thing.py”, line 13, in create  
assert self.exists() == False, “Thing already exists”  
File “thing.py”, line 25, in exists  
list\_of\_things = self.client.list\_things()[‘things’]  
File “C:/msys32/mingw32/lib/python2.7/site-packages/botocore-1.12.156-py2.7.egg/botocore/client.py”, line 357, in \_api\_call  
return self.\_make\_api\_call(operation\_name, kwargs)  
File “C:/msys32/mingw32/lib/python2.7/site-packages/botocore-1.12.156-py2.7.egg/botocore/client.py”, line 661, in \_make\_api\_call  
raise error\_class(parsed\_response, operation\_name)  
botocore.exceptions.ClientError: An error occurred (500) when calling the ListThings operation (reached max retries: 4): Internal server error  
======================  
Appreciate any help, I am not sure what I am missing.

Other notes:

- my current file location for this is:  
C:\Users\x007007\Desktop\AWS\_eval\amazon-freertos-master\tools\aws\_config\_quick\_start

_Normally, this script supposed to do the following_:

1. Creates an IoT thing, certificate, and policy
2. Attaches the IoT policy to the certificate and the certificate to the AWS IoT thing
3. Populates the aws\_clientcredential.h file with your AWS IoT endpoint, Wi-Fi SSID, and credentials
4. Formats your certificate and private key and writes them to the aws\_clientcredential.h header file

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 29, 2019, 7:10pm UTC](https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918/2 "2019-05-29T19:10:27Z")

</div>

**[mradula-aws](https://forums.aws.amazon.com/profile.jspa?userID=454716)** wrote on May 29, 2019:

Hello,

1. Would you be able to verify if the Thing you are creating already exists in your account? The setup script has to be used to create Thing, certificate and policy for the 1st time. But if the Thing already exists in you AWS account, it will throw an error.
2. It also shows that you are getting 500 error from the server. Can you run the command `aws iot list-things` on you command line to see if it works.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 29, 2019, 9:29pm UTC](https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918/3 "2019-05-29T21:29:27Z")

</div>

**[KV\_KP](https://forums.aws.amazon.com/profile.jspa?userID=484313)** wrote on May 29, 2019:

1. I never created the thing, but I still double checked its not there.
2. yes, _aws iot list-things_ command works and gives me the list of other things in my account.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 30, 2019, 6:59pm UTC](https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918/4 "2019-05-30T18:59:37Z")

</div>

**[mradula-aws](https://forums.aws.amazon.com/profile.jspa?userID=454716)** wrote on May 30, 2019:

It looks like there is high API usage in the AWS region that you are creating the Thing in. Would it be possible for you to change the region and retry. You will need a different IAM user in that region.Also, you have to run _aws configure_ again for the new IAM user Access Key and Secret Key.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 31, 2019, 6:36pm UTC](https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918/5 "2019-05-31T18:36:35Z")

</div>

**[KV\_KP](https://forums.aws.amazon.com/profile.jspa?userID=484313)** wrote on May 31, 2019:

I gave up on FreeRTOS and ended up using MongooseOS which worked almost seamlessly.  
MongooseOS - [[https://mongoose-os.com/aws-iot-starter-kit/#dev](https://mongoose-os.com/aws-iot-starter-kit/#dev)]  
(see link below for one minor issue that I had.)  
[[https://superuser.com/questions/1442729/esp32-wifi-constantly-fails-to-connect-and-returns-201](https://superuser.com/questions/1442729/esp32-wifi-constantly-fails-to-connect-and-returns-201)]

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 5, 2019, 2:37pm UTC](https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918/6 "2019-06-05T14:37:09Z")

</div>

**[TiglathIII](https://forums.aws.amazon.com/profile.jspa?userID=483500)** wrote on June 05, 2019:

Hi @KV\_KP, I noticed that you were using _“WPA2”_ for _“wifi-security”_. This value actually needs to be _“eWiFiSecurityWPA2”_.

Cheers…

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [June 21, 2019, 6:15pm UTC](https://forums.freertos.org/t/amazon-freertos-configuration-issue-with-esp32-devkitc/8918/7 "2019-06-21T18:15:09Z")

</div>

**[Gaurav-Aggarwal-AWS](https://forums.aws.amazon.com/profile.jspa?userID=447386)** wrote on June 21, 2019:

Very good catch. Thanks for pointing this out.

We have updated our script to throw error in case of incorrect WiFi security value: [https://github.com/aws/amazon-freertos/pull/822](https://github.com/aws/amazon-freertos/pull/822)

Thanks.
