/serverless-contact-form

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

Primary LanguageJavaScript

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/<verified@email.com>"
        }
    ]
}

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