Skip to main content

Provides a Django app and a lambda handler for sending emails concerning errors in AWS

Project description

Currently only supports failed step functions. This is half-baked so far

Usage

# settings.py

INSTALLED_APPS = [
    "django_serverless_emailer",
    # ...
]

AWS_REGION = "us-west-2"  # your region

DEFAULT_FROM_EMAIL = "an-email@email.com"  # your sender
EMAIL_HOST = "smtp.gmail.com"  # your host
EMAIL_PORT = 465  # your port
EMAIL_HOST_USER = "an-email@email.com"  # your user
EMAIL_HOST_PASSWORD = os.getenv["EMAIL_PASSWORD"]
EMAIL_USE_SSL = True  # if you're using SSL

EMAIL_RECEPIENTS = "a@b.com,c@d.com"  # comma delimited list or a plain list
# serverless.yml

functions:
  notify:
    handler: django_serverless_emailer/handler.notify
    description: Send an email when there's something in the queue
    layers:
      - { Ref: PythonRequirementsLambdaLayer }
    timeout: 10
    environment:
      DJANGO_SETTINGS_MODULE: setup.settings # path to your settings module
    events:
      - sqs:
          arn:
            Fn::GetAtt:
              - ErrorNotificationDlq
              - Arn

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-serverless-emailer-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-serverless-emailer-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-serverless-emailer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e285ac61d4150c90c1d2c507117f1e3377d52960bfa047e51863f73125fde4d7
MD5 9e937379cef101c8f5660ca8c6144197
BLAKE2b-256 284d28f7b79279035852c20e46e5839fc1f3e7b1b53f08ed14f571b4b09270ad

See more details on using hashes here.

File details

Details for the file django_serverless_emailer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_serverless_emailer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f265519d068fe8126bd2c68b11591eead95bcc890616a7a320dbdbbb7444361
MD5 27aa5ba625b3cdb1bacb3493d7cbafa6
BLAKE2b-256 f73a938f0a4198a41c14232e041175a4810d7ea7a1af7d1aa7710625c73ca304

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page