Skip to content

An example of how to create a serverless contact form using GraphQL, Lambda, and SES.

Notifications You must be signed in to change notification settings

emjaksa/serverless-contact-form

 
 

Repository files navigation

Serverless Contact Form

🚨Video Series and Blog Post coming soon!🚨

This is an example of how to use AWS Amplify to create a contact form. The form is contained within a component so that it may live at any depth in your application.

TODO

  • initialize project✔
    • Gatsby
  • create and style the form component✔
    • CSS Modules
    • CSS Grid
  • add AWS Amplify to the project✔
  • create backend services✔
    • appsync api via api token
    • lambda
    • ses env for prod and dev testing
  • configure custom resolver to use AWS SES✔
  • update UI to handle Success, Pending, and Failure cases
  • document how to get started with amplify init --app ghURL
    • How to add inline policy for lambda to contact SES

Wishlist

Extend project by creating a plugin for the function service that adds the policy needed for a lambda to talk to SES and sends a verification email. For integrating with the AWS SDK, it looks like this would help. This is the policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "ses:SendEmail",
            "Resource": "arn:aws:ses:<region>:<accountID:identity/<[email protected]>"
        }
    ]
}

Remember to properly configure the lambda to use SES. To see all the fields, check out the official docs

About

An example of how to create a serverless contact form using GraphQL, Lambda, and SES.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.7%
  • CSS 17.3%