Code Monkey home page Code Monkey logo

bin-day-notifier's Introduction

Summary

This repository contains code which will enable you to setup a notification to remind you when to put the bins out and what colour. It is a simple program and will not take into account changes of bin days. However it should be suitable for most of the year.

Design

The components making up this repository are:

  • Lambda function - runs on a schedule, reads a file from S3 to determine the bin colour and publish a message to a SNS topic.
  • S3 bucket - contains a single file which contains the next bin colour. This is updated such that it alternates between "Black" and "Green" each week.
  • SNS topic - the topic which is used to send notifications out to the user to remind them to put the bins out. This is pre-populated with the email in template.yaml.

How to configure

Update template.yaml file to put in the email address you want notifications to be sent to. Replace "YOUR_EMAIL_HERE" with this email address.

Subscription:
  - Protocol: email
    Endpoint: YOUR_EMAIL_HERE

Update template.yaml file to change the day and time of the notification will be sent. At the moment this is configured for 1800 every Tuesday.

BinDayNotifierScheduler:
  Type: Schedule
  Properties:
    Schedule: cron(0 18 ? * TUE *)

Update any logic in the Python script. At present, the script fetches a file from S3 which has the current week's bin colour. This alternates between "Black" and "Green".

How to deploy

To run this you will need:

  • aws-sam to be installed and configured correctly with all required permissions
  • Docker to be installed and running

Deploy with:

sam build --use-container
sam deploy --no-confirm-changeset

bin-day-notifier's People

Contributors

wardellc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.