3

I am using https://github.com/Schm1tz1/aws-sdk-arduino-esp8266 default repository inside arduino sdk.

But It's sample code wont update shadow thing on AWS IOT. I configured everything correctly, Can some one help me on it?

Harshil Makwana
  • 155
  • 2
  • 13

3 Answers3

3

I have put quite some time on this last month. All the examples I had found had an issue or another. It must be because library Core ESP8266 for Arduino has been updated not long ago; SSL implementation has changed...

I have been to figure out what was wrong, fix it, and make it work. I use the ESP8266 and connect to AWS IoT using MQTT and x509 certificate for authentication.

Here is the walkthrough I have put together: https://raphberube.com/blog/2019/02/18/Making-the-ESP8266-work-with-AWS-IoT.html

If you stumble on this I hope it will be useful for you.

raph84
  • 31
  • 1
  • 4
2

I am able to develop code using ARDUINO IDE that connects ESP8266 with AWS IOT by using this repo:http://github.com/odelot/aws-mqtt-websockets

Harshil Makwana
  • 155
  • 2
  • 13
1

The project mentioned by @Harshil Makwana forces you to create an IAM user and then put the credentials on the device. This is not a secure way to connect and should be avoided if possible.

The proper way is to use TLS 1.2, with the use of embedded certificates. A project showing how to do this can be found here: https://github.com/copercini/esp8266-aws_iot

Reid
  • 4,376
  • 11
  • 43
  • 75
  • That's nonsense. The IAM user method is as secure as the certificate one. You have to store the private credentails anyway so both provide the same level of security – Gianluca Ghettini Nov 08 '21 at 15:46
  • I agree w/ Gianluca. Putting a certificate on a device doesn't it insecure given that proper IAM permissions are in place. Plus, an account admin can revoke that certificate at any moment if a device is compromised. – BinaryButterfly Dec 17 '21 at 18:19