sendnotification

v1.0.8
Send notification CLI

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 configuration settings
AWS_ACCESS_KEY_ID=""
AWS_REGION=""
AWS_SECRET_ACCESS_KEY=""

# Mailjet configuration settings
MJ_APIKEY_PRIVATE=""
MJ_APIKEY_PUBLIC=""

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

Metadata

  • MIT
  • Whatever
  • Alex Bosworth
  • released 7/16/2020

Downloads

Maintainers