Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.44 KB

File metadata and controls

52 lines (37 loc) · 1.44 KB

DynamoCode.EmailSender

Deploy-AWS

This repository contains a Lambda function that is connected to an SQS queue to receive messages and send emails based on the information.

The credentials to access SMTP server are expected to stored in SSM Parameter Store. The parameter values are prefixed with DynamoCode.EmailSender which corresponds to the AppName value. It can be overridden at deploy time as a template parameter.

/DynamoCode.EmailSender/SmtpSettings/Server
/DynamoCode.EmailSender/SmtpSettings/Port
/DynamoCode.EmailSender/SmtpSettings/Username
/DynamoCode.EmailSender/SmtpSettings/Password
/DynamoCode.EmailSender/SmtpSettings/EnableSsl

Message format

{
    "FromEmail": "from@example.com", 
    "FromName": "My App Test",
    "ToEmail": "me@example.com",
    "Subject": "test from lambda SQS",
    "Body": "Text to send in an email body. <br/> Here is a <a href='www.example.com'>link</a> to test HTML"
}

Prerequisites

Build

sam build

Deploy

Update file samconfig.toml accordingly and then run

sam deploy

Alternatively just run

sam deploy --guided