Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtliendo/serverless-contact-form
An example of how to create a serverless contact form using GraphQL, Lambda, and SES.
https://github.com/mtliendo/serverless-contact-form
aws awsamplify graphql lambda ses
Last synced: 3 months ago
JSON representation
An example of how to create a serverless contact form using GraphQL, Lambda, and SES.
- Host: GitHub
- URL: https://github.com/mtliendo/serverless-contact-form
- Owner: mtliendo
- Created: 2019-10-30T02:54:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-16T22:01:52.000Z (over 3 years ago)
- Last Synced: 2023-03-15T19:32:09.544Z (almost 2 years ago)
- Topics: aws, awsamplify, graphql, lambda, ses
- Language: JavaScript
- Homepage: https://master.d2q078pxl9k9t4.amplifyapp.com/
- Size: 643 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Serverless Contact Form
🚨Video Series and Blog Post coming soon!🚨
This is an example of how to use [AWS Amplify](https://aws-amplify.github.io/) 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](https://aws-amplify.github.io/docs/cli-toolchain/plugins) 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](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#verifyEmailIdentity-property). This is the policy:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "ses:SendEmail",
"Resource": "arn:aws:ses::"
}
]
}```
Remember to properly configure the lambda [to use SES](https://github.com/mtliendo/serverless-contact-form/blob/master/amplify/backend/function/contactfunction/src/index.js). To see all the fields, check out [the official docs](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/ses-examples-sending-email.html)