Skip to content

Instantly share code, notes, and snippets.

View mshuber1981's full-sized avatar
💭
Working for the man...

Michael Huber mshuber1981

💭
Working for the man...
View GitHub Profile
@mshuber1981
mshuber1981 / index.js
Last active June 26, 2022 22:18
API Gateway Lambda (Node.js) proxy with SES example
// https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html
const AWS = require("aws-sdk");
const ses = new AWS.SES();
// https://aws.amazon.com/premiumsupport/knowledge-center/lambda-send-email-ses/
const SENDER = "Your name <YourVerrifiedEmail@provider.com>";
function response(status, message) {
const res = {
isBase64Encoded: false,
@mshuber1981
mshuber1981 / contactFormLambda.js
Last active June 24, 2022 19:22
AWS Contact Form Lambda (Node.js) with SES example
// Full example - https://aws.amazon.com/blogs/architecture/create-dynamic-contact-forms-for-s3-static-websites-using-aws-lambda-amazon-api-gateway-and-amazon-ses/
const AWS = require('aws-sdk');
const ses = new AWS.SES();
// https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html
const SENDER = 'Your verified SES email address';
function sendEmail (event) {
let params = {
Destination: {