Skip to content

Emrin/aws-lambda-ses-recaptcha

Repository files navigation

AWS Lambda for Simple Contact Form [Node.js]

When a user fills a contact form on your website (using ReCaptcha), and sends it, this function will check if the ReCaptcha token in the request is valid, and if so, will send you a personal email.

Your front end should send a POST request to your function's endpoint with a body payload in the form of

{
  email: client_email_field,
  subject: subject_field,
  message: message_field,
  token: frontend_recaptcha_token
}

Documentation

Using AWS Lambda with NodeJS.
To customize your email, check the AWS SES API Reference.

Optional Configuration

If you're new to AWS Lambda you should start with the setup guide to install your AWS CLI, create an IAM user with the right permissions, and run aws configure. Also create your Lambda function (referred to as my-function below).

Updating

  1. Zip files: once unzipped you should immediately be in root.
  2. Run in the current directory: aws lambda update-function-code --function-name my-function --zip-file fileb://your-zip-file.zip

About

Contact form backend in NodeJS [AWS Lambda + Emailer SES + ReCaptcha}: Will verify the ReCaptcha token's validity and if valid will send an you a personal email.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published