I wrote an AWS Lambda (Java) and SNS guide

Associate
Joined
18 Feb 2010
Posts
940
Hi,

I wrote a guide for setting up an AWS Lambda function which checks every day at 10am if a particular football team is playing. If they are, it sends you a text message via SNS.

I'll just drop it here - any feedback is really welcome and I hope it's useful to someone as a learning resource. I'll be writing up more tutorials on small projects as and when I find the time.

http://nutbrown.io/2017/03/06/aws-football-alerts/

Thanks,
 
Associate
OP
Joined
18 Feb 2010
Posts
940
Just to let you know i'm writing another. It's currently in draft, i'll link to it when I can, but it's along these lines:


This tutorial will help you to gain some hands on experience with IFTTT, AWS Api gateway, AWS Lambda functions (Nodejs), AWS Cloudwatch, AWS S3 (Object storage) and AWS SNS (Simple notification service). The main motivation behind the project is to keep track of your weight, and to send you a text message at a time you feel you are most likely to give in to the wonderful temptations of food.

You will need:


Here is a summary of how it will work:

You stand on your scales every day, probably just after your morning shower or brushing your teeth. Withings sends your weight measurements to IFTTT (Requires your approval). You set up an IFTTT "applet" which tells IFTTT to send a HTTP request to AWS Api gateway when it receives a new measurement. Your AWS Api gateway forwards the request on to your lambda function written in Nodejs, which stores your measurement in a object on Amazon S3. This object keeps track of all your measurements and keeps a history of your weight.

You schedule (using cloudwatch) another lambda function to run at a time of your choosing, once per day (E.g just before dinner time). This lambda function pulls your measurements from the file you have already stored in S3. It calculates the average of your last 7 measurements and compares them to the average of the 7 measurements before that. If your weight has decreased in the 7 most recent measurements, it sends you a motivational text message. If your average weight has increased, it sends you a text telling you that you've gained weight and should be careful with what you eat.
 
Back
Top Bottom