https://github.com/madh93/cann
🇮🇨 🧑🏫 Substitute teachers announcements of Government of the Canary Islands
https://github.com/madh93/cann
aws canarias go golang notifications pet-project serverless telegram terraform
Last synced: 1 day ago
JSON representation
🇮🇨 🧑🏫 Substitute teachers announcements of Government of the Canary Islands
- Host: GitHub
- URL: https://github.com/madh93/cann
- Owner: Madh93
- License: gpl-3.0
- Created: 2021-03-20T23:51:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T21:50:11.000Z (about 3 years ago)
- Last Synced: 2026-04-07T06:36:10.929Z (5 days ago)
- Topics: aws, canarias, go, golang, notifications, pet-project, serverless, telegram, terraform
- Language: HCL
- Homepage:
- Size: 140 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cann
Serverless app to check the daily [substitute teachers announcements](https://www.gobiernodecanarias.org/educacion/web/personal/docente/oferta/interinos-sustitutos/nombramientos_diarios/) of Government of the Canary Islands. When a new announcement is published, a notification is sent to Telegram.
## Requirements
- [Go](https://golang.org)
- [Terraform](https://www.terraform.io)
## Architecture

## How it works
A scheduled event executed at regular intervals triggers a Lambda function that
checks if there is a new announcement. When a new announcement is published, the
URL is stored in a DynamoDB table that triggers a second lambda which publish in a
SNS Topic. Finally a Lambda subscribed to the topic notifies to a Telegram channel.
- **CloudWatch Events:** cron scheduled triggers
- **DynamoDB:** store the state
- **SNS:** fan-out notifications
- **Parameter Store:** Telegram auth token
- **Lambdas:**
- [check_announcement](lambda/check_announcement/main.go)
- [send_notification](lambda/send_notification/main.go)
- [send_telegram_notification](lambda/send_telegram_notification/main.go)
## Motivation
This is just a pet project to play with Go, Terraform and Serverless architecture. This solution can be replaced by a [simple bash script](https://github.com/Madh93/dockerfiles/blob/master/nombramiento-maestros/nombramiento-maestros.sh) executed by a cron job running on a server 24/7, however the biggest attractive of this solution it is an almost zero cost solution thanks to the [AWS Free Tier](https://aws.amazon.com/free).
## Current integrations
| Name | Telegram |
|---|---|
| Maestros de S/C Tenerife | https://t.me/nombramientos_maestros_tfe |
| Maestros de Las Palmas | https://t.me/nombramientos_maestros_lp |
| Profesores de ambas | https://t.me/nombramientos_profesores |