Skip to main content

Posts

Showing posts from September, 2017

AWS IoT Button (2nd gen.): sending an SMS message

I recently purchased an AWS IoT Button (2nd generation), which can be found here for $20. This is basically a physical button that connects to wi-fi and easily integrates with AWS applications, especially Lambda. To set  up my button, I followed the process here . I opted for to download the iOS app  to ensure the easiest setup process. The first time I tried setting up the button, I couldn't connect it to wi-fi (so it was useless). I tried several different networks, to no avail. Seeing no other options, I gave it a rest and tried again the next day. With no apparent change to my network or setup process, the button connected as intended. At the end of the mobile app-based setup process, I was prompted to set a Lambda function that will be executed when the button is clicked. I chose the preset function to send an SMS message using Python. (Note: This function will appear in your Lambda console and can be edited in any way.) I entered my cell phone number and desired message,...

Reading from and Modifying a DynamoDB Table using API Gateway

In many IoT (Internet of Things) projects, it is necessary to read from and write to a database. AWS has an application called DynamoDB that is a NoSQL database, exactly what we need. While it is very simple to add/modify/delete entries in this database via the user interface, it's not so obvious how to do so via HTTP API calls. So, in this post I'll continue the AWS portion of my journey into IoT to learn how to do just that. I'll be following  this  tutorial. The first thing I encountered is I wasn't sure if I was supposed to follow the steps under "Defining APIs", or if that was just knowledge for later. Turns out, that was knowledge for later. If I had any prior experience with APIs I probably would have realized this. Basically, the "API definition"s are just a high-level plan for what you want your API requests to look like in the end. In my opinion this information should go in the "Creating the APIs" section. Moving through "Cr...

Learning AWS Lambda, API Gateway, and DynamoDB

The first step I'm taking in my IoT journey is to learn about Amazon Web Services (AWS). Many IoT products utilize (or can utilize) this service, which is why it seems like a good starting place. Cloud computing is essential to IoT, since very little processing is done at the local level (hence: "internet"). If you aren't aware, AWS is a serverless platform that allows developers to run code, build databases, and much more all in the cloud. There are several advantages to using AWS: frees developers and businesses up from having to administer to their own servers, since Amazon takes care of all server maintenance virtually unlimited scaling, since AWS will dedicate more or fewer servers as needed for your data only pay for the time when your code is called (in the case of AWS Lambda) -- not idle time To get started, I followed these tutorials. They walk you through how to set up an AWS account and the AWS CLI (Command Line Interface), as well as how to use the Lambda,...