{"id":15756758,"url":"https://github.com/garnertb/aws-lambda-send-ses-email","last_synced_at":"2025-03-31T08:24:58.669Z","repository":{"id":147289805,"uuid":"69502148","full_name":"garnertb/aws-lambda-send-ses-email","owner":"garnertb","description":null,"archived":false,"fork":false,"pushed_at":"2016-04-26T00:37:20.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T12:48:16.369Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garnertb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-28T20:43:08.000Z","updated_at":"2020-07-08T21:58:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e2c1843-5095-43d2-befc-ef3416fe14e8","html_url":"https://github.com/garnertb/aws-lambda-send-ses-email","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.23076923076923073","last_synced_commit":"912b46e1fd2d240de8c36a4410c9e02f292c1172"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Faws-lambda-send-ses-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Faws-lambda-send-ses-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Faws-lambda-send-ses-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Faws-lambda-send-ses-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garnertb","download_url":"https://codeload.github.com/garnertb/aws-lambda-send-ses-email/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246437966,"owners_count":20777315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T09:01:28.671Z","updated_at":"2025-03-31T08:24:58.651Z","avatar_url":"https://github.com/garnertb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-lambda-send-ses-email\n\nAn AWS Lambda function to send emails using Amazon SES.\n\nThe primary purpose of this function is to provide a server-side back-end for sending emails\nfrom static websites.\n\nBy using AWS Lambda, we can eliminate the need to host your (almost) static website on\nEC2 instances.\n\n## Installation\n\n1. Create an IAM Role for executing AWS Lambda functions. \n2. Give your new IAM Role the following policy:\n\n```json\n{\n    \"Version\" : \"2012-10-17\",\n    \"Statement\" : [\n        {\n            \"Effect\" : \"Allow\",\n            \"Action\" : [\n                \"logs:CreateLogGroup\",\n                \"logs:CreateLogStream\",\n                \"logs:PutLogEvents\"\n            ],\n            \"Resource\" : \"arn:aws:logs:*:*:*\"\n        },\n        {\n            \"Effect\" : \"Allow\",\n            \"Action\" : [\n                \"cloudwatch:PutMetricData\"\n            ],\n            \"Resource\" : \"*\"\n        },\n        {\n            \"Effect\" : \"Allow\",\n            \"Action\" : [\n                \"ses:SendEmail\"\n            ],\n            \"Resource\" : \"*\"\n        },\n        {\n            \"Effect\" : \"Allow\",\n            \"Action\" : [\n                \"s3:GetObject\"\n            ],\n            \"Resource\" : \"*\"\n        }\n    ]\n}\n```\n\n3. Create an S3 bucket to store the email template(s).\n\n4. Create a template file (HTML or text file). A sample file is provided in the `Templates/` folder.\n\n5. Upload the template file to your S3 bucket.\n\n6. Download the latest release ZIP file.\n\n7. Edit `config.js` providing your own details. Put your customized file back into the ZIP file.\n\n8. Create an AWS Lambda function using your custom ZIP file as the source code.\n\n## Usage\n\nCall the Lambda function with any number of properties. The properties will be passed on to the\ntemplate file for substitution.\n\n### Notable Parameters\n\nemail: This parameter is required. It's used to populate the \"Reply-To\" field of the email.\n\nname: This parameter is optional, but when omitted, the value from `email` will be used.\n\n### Example 1\n\nTemplate File:\n\n```\n\u003cp\u003e\n  Name: {{name}}\u003cbr /\u003e\n  Email: {{email}}\u003cbr /\u003e\n\u003c/p\u003e\n\u003cp\u003e{{message}}\u003c/p\u003e\n```\n\nInput Parameters:\n\n```\n{\n  \"name\": \"John\",\n  \"email\": \"john@example.com\",\n  \"message\": \"This is my message\"\n}\n```\n\n## Credits\n\nThe following libraries are used:\n\n* AWS SDK for NodeJS\n* Markup.js - https://github.com/adammark/Markup.js/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarnertb%2Faws-lambda-send-ses-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarnertb%2Faws-lambda-send-ses-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarnertb%2Faws-lambda-send-ses-email/lists"}