Last active
October 3, 2017 18:01
-
-
Save pbzona/a3f56785862327043175ea930b1a61f9 to your computer and use it in GitHub Desktop.
Boilerplate code for serverless contact form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
console.log('Loading function'); | |
const AWS = require('aws-sdk'); | |
const sesClient = new AWS.SES(); | |
/** | |
* Lambda to process HTTP POST for contact form with the following body | |
* { | |
"Email": <contact-email>, | |
"Subject": <contact-subject>, | |
"Message": <contact-message> | |
} | |
* | |
*/ | |
exports.handler = (event, context, callback) => { | |
console.log('Received event:', JSON.stringify(event, null, 2)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment