- HTML page with a form.
- Script to collect the form data to the API.
- Lambda Script to send the data to email using AWS SES.
- API Gateway with POST method.
- Set your SES service and validate your email.
- Give ID attributes to your form tables so the data can be referred.
- The submit button has an onClick event which is associated with the function's name as
onClick="submitToAPI(event)"
. - Make sure your HTML page called the API script using the
<script/>
attribute. - The API script will assign variables with your data using
getElementById(ATTRIBUTE_ID)
. - In the API script, assign your API gateway URL in the
API_URL
. - The data will be sent to the lambda script with the POST method.
- The Lambda script will send the requested data to the email through SES.
- You need to assign the email in the Lambda script or through environment variables.