Lambda Mailing Service is an AWS Lambda function designed to send emails using Amazon SES (Simple Email Service). This service is triggered by HTTP POST requests and can send emails to specified recipients with a custom subject and body.
- Sends emails using AWS SES.
- Handles HTTP POST requests via API Gateway.
- Customizable subject, body, and recipient list.
-
AWS Configuration:
- Ensure that SES is configured in the
ap-south-1region. - Verify the sender email address (
[email protected]) in SES.
- Ensure that SES is configured in the
-
IAM Role Permissions:
-
The Lambda function must have the
ses:SendEmailpermission. -
Ensure the IAM role associated with the Lambda function has the following policy:
{ "Effect": "Allow", "Action": "ses:SendEmail", "Resource": "*" }
-
-
Deployment:
- Use the Serverless Framework to deploy the service:
serverless deploy
- Use the Serverless Framework to deploy the service:
-
Endpoint:
/send-email -
Method:
POST -
Request Body:
{ "subject": "Your Subject", "body": "Your email body content", "toAddresses": ["[email protected]"] }