A Rust Lambda function that is used to deliver downtime messages for my website to Mastodon.
Uses megalodon-rs and aws lambda rust runtime to publish status to @sachiniyerstatus@botsin.space @sachiniyerstatus@mas.to.
I use AWS infra because I don't want to be dependent on my cluster for this. However, I still use my status api (source) to get status on all my services. If that goes down, I assume the whole cluster is down.
Specifically, I have a lambda function that is triggered by a scheduled cloudwatch rule to run every 30 5 minutes.
You should be able to run/deploy this as well. Make sure to clone recursively.
- copy
env.sample
to.env
and modify it - install Cargo Lambda
- run
cargo lambda watch --env-file .env
- run
cargo lambda invoke --data-ascii "{}"
to test the function
- copy
env.sample
to.env
and modify it - install Cargo Lambda
- to deploy
cargo lambda deploy --iam-role <IAM ROLE> --env-file .env <LAMBDA NAME> --binary-name mastodon-status