Shanel Wu

They/them. PhD student: smart textiles, weaving, computational craft, hardware hacking.

View My GitHub Profile

29 October 2019

Using a Pi with AWS Services

by Shanel

Screenshot of temperature/humidity GUI accessed via HTML

Installation Sources

This project was also built on top of the first two class projects, described in this previous post and this post, so these installations were in addition to the ones listed there.

Server (Raspberry Pi)

Client (another machine)

Issues

#1. Connecting to MQTT: Because we originally set up MQTT on one of our Pi’s, but later ported it to the other Pi, we realized that we had not completely changed over the security credentials so that AWS would recognize the other PI.

#2. Setting up the Lambda function: Lambda functions have many runtime options: Node.JS, Python 3.7, Python 2.7, and many more. When we incorrectly generated a Lambda in Node.JS and then tried to switch it over to Python, there were many small formatting errors because of AWS’s template generation, like in the filenames, handler names, etc. It was easier to delete the Lambda and start from scratch. In retrospect, it might have been easier to use Node.JS for the Lambda function, as the function parsed JSON’s. Since we were already fairly accustomed with JSON functions in Node.JS, we had to re-learn the function names for Python.

#3. Configuring Roles, Permissions, Policies: There were a lot of permissions- and authentication-related forms to match up between AWS services, devices accessing AWS services, and our own accounts.