Skip to content

Instantly share code, notes, and snippets.

View awood45's full-sized avatar

Alex Wood awood45

View GitHub Profile
@awood45
awood45 / serverless-office-hours-demo-template.yaml
Last active November 1, 2022 17:57
Template used for Serverless Office Hours on 2022-11-01 - just bring your own code to process the event!
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
connector-workflow
Sample SAM Template for connector-workflow
Resources:
SourceBucket:
Type: AWS::S3::Bucket
@awood45
awood45 / WEATHER_APP.md
Last active November 29, 2020 22:26
Adverse weather notification app - the highlights.

I started from a sam init using Ruby 2.7. Run sam deploy --guided and provide a phone number (you may get texted to confirm your subscription), latitude, and longitude. These are passed in to the weather.gov APIs, and this particular app focuses on wind. Of course, you can modify the handler logic to alarm on whatever you happen to care about (the APIs are public, easy to run curl on them to explore what they return. If you are going to put this in a repo somewhere, you may also want to add samconfig.toml to your .gitignore so as to not broadcast your phone number, latitude, or longitude to the world.

In the future, I may enhance this to run on an hourly basis to collect "should notify" status overnight to be sent out in the morning, or to avoid re-texting the same adverse notification each hour on a high wind day. For that I might use something like AWS SSM (as a sort of cache of values like "when did I last send a text" or "has there been an adverse weather threshold since the last text notificat

@awood45
awood45 / gist:9d1fcfd4e748dcd5d860
Last active August 29, 2015 14:19
RailsConf 2015 AWS Lab Instructions

INSTRUCTION SHEET: http://tinyurl.com/railsconf2015-aws

Feel free to give this a shot before or after the lab as well!

For this lab, you will need to have an AWS account. You can create one at https://aws.amazon.com/ if you do not yet have one. We will be providing AWS credits at the lab if you'd like to experiment more after the lab. We hope you do!