I have this static website that has a form with a couple of fields. CloudFront is on front of the bucket routing traffic to the site.
Them form in question naturally has a button that POST to '#'.
Is there a way I could make the hits on the button trigger a lambda function with the content of the form's fields?
Thanks in advance.
API Gateway is typically used to call the Lambda function from a Web Page.
Here is a basic tutorial matching your architecture: https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/