sendnotification

Send notification CLI

Usage no npm install needed!

<script type="module">
  import sendnotification from 'https://cdn.skypack.dev/sendnotification';
</script>

README

Send Notification

npm version Coverage Status Build Status

Relay notifications based in stdin data

echo "5000" | sendnotification SNS "SNS_TOPIC_IDENTIFIER" "the current balance is %d"

// the current balance is 5000

Configuration

Set environment variables or setup ~/.sendnotification/.env

AWS_ACCESS_KEY_ID=""
AWS_REGION=""
AWS_SECRET_ACCESS_KEY=""

Docker

There is an included Docker file, as well as a public image at alexbosworth/sendnotification

Example usage with Docker, referencing a .env file with the environment variables encoded:

echo "5000" | docker run -i --rm --env-file .env alexbosworth/sendnotification SNS "sns-topic-id" "the current balance is %d"

This should post the notification body to the specified topic, with the sprintf'ed contents