Sample code for using ESP32-CAM with AWS IoT Core to take pictures on-demand and store them in S3.
Using the sample code you can connect an ESP32-CAM device to AWS IoT Core and have it take pictures on-demand and store them in S3. Uses serverless technology and fully managed services.
Recording from Nordic Serverless May 27th
- Open
device
subfolder in VS Code and install PlatformIO extension. - Create your device using the
Creating AWS IoT things
wizard in AWS Console (or using cli for power users). Take note of the thing name and download the certificates and CA certificate. - Create a policy using the AWS Console or cli. See
policy.json.template
for needed policies. - Create
lib/conf/conf.h
based onlib/conf/conf.h.template
. Update WIFI_SSID, WIFI_PASSWORD, DEVICE_NAME, AWS_IOT_SUB_TOPIC, AWS_IOT_PUB_TOPIC, AWS_IOT_ENDPOINT and the three certificates. - Flash your device. Keep an eye on the serial output to see that all goes well.
Read Nathan Glover's blog post for more information: https://devopstar.com/2020/05/16/aws-iot-esp32-cam-setup
- Open
backend
subfolder in VS Code. - Create
env.yml
based onenv.yml.template
. Update at minimum IOT_ENDPOINT, IOT_TOPIC_PUB (should be the device's sub topic) and IOT_TOPIC_SUB (should be the device's pub topic). - Deploy using Serverless Framework. Add --stage and --region if needed.
sls deploy
- Test the flow by posting to the endpoint shown in output.
Reach out to Gunnar Grosch if you have any questions.