In a post about accessing Amazon Web Services from Node-RED that I wrote for another device, I claimed that it would also work on a Raspberry Pi. I wrote that without testing.

I guess I'll have to put the money where the mouth is, and show that the claim is true.

Let's install Node-RED on a Pi and communicate with Amazon Web Services.

image: action capture of AWS IoT Core's MQTT Test page shooting a message to the Node-RED running on YOUR! Raspberry Pi



Starting Position: Fresh Raspbian Stretch Lite with Node-RED and AWS Nodes



Register Raspberry Pi as A Thing, Test with AWS Test Kit and Install Certificates


I followed my own instructions to configure the Raspberry Pi as a Thing in AWS and test it with the AWS Test Kit.

Follow these two sections: Set up the Node-RED Container as an AWS Thing and Adapt the Security Policy.

Where you see harting_mica_nodered, use rapsberrypi.

In the raspberrypi-Policy, make sure to add client/raspberrypi* instead of client/harting_mica_nodered*.


Testing the Exchange with AWS and Node-RED


I'm again using the test flow from my Harting Mica blog. Only the certificate directory name, endpoint and client id are different:

After Deploying the flow, use the  IoT Core Test MQTT page to shoot a message to topic_1.



Yes. Success. Enjoy.

Need inspiration? To see what you can do with your (sensor?) data once it arrived at AWS, check: Manage Arduino MKR WIFI 1010 Battery Life in the Cloud - AWS, Graphs and Alerts.