Skip to content
/ s3mailer Public

AWS Lambda function to send e-mail using SendGrid or Amazon SNS.

License

Notifications You must be signed in to change notification settings

mm948/s3mailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3mailer

Overview

AWS Lambda function to send e-mail using SendGrid or Amazon SNS.

Requirement

  • SendGrid API
  • Amazon SNS access permission

Usage

  1. pip install sendgrid.

  2. Create new function with this code.

  3. Set SendGrid API key to environment valiables.

  4. Add S3 trigger.

    Trigger setting
    Event source bucket Any
    Event source type Create object or put
    Prefix Any
    Suffix Any
  5. Save this function.

  6. Use sample file(./Test/sample.json) and replace each key value.

    Key Description
    TYPE Set "sendgrid" or "sns"
    SEND_FROM Send from E-mail address
    SEND_TO Send to E-mail address
    CONTENT Body
  7. Upload sample file to S3 bucket.

Licence

MIT

Author

mm948

About

AWS Lambda function to send e-mail using SendGrid or Amazon SNS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages