llama-error-notification-generator
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

🦙 llama-error-notification-generator 🦙

This is a simple utility that allows for sending error messages to an AWS SNS topic so they can be forwarded on to an email address subscribed to the topic.

usage

environment configuration

This library requires certain environment variables to be present for it to run successfully:

  • AWS_ACCOUNT_ID (required)
    • The AWS account id which contains the SNS topic
  • AWS_REGION (optional)
    • The AWS region the SNS topic is located in
    • Defaults to us-east-1
  • SNS_NOTIFICATION_TOPIC_NAME (required)
    • The name of the topic you want to send messages to

You can send a message like so:

await notificationGenerator.sendErrorNotification({
    // An error in your application that requires email notification
    error: someError,
    // An identifier of the source application of the error
    source: 'application-identifier'
})

Readme

Keywords

none

Package Sidebar

Install

npm i llama-error-notification-generator

Weekly Downloads

6

Version

1.0.7

License

MIT

Unpacked Size

216 kB

Total Files

17

Last publish

Collaborators

  • spenserca