trigger lambda from a button in a static website in s3

偶尔善良 提交于 2020-12-13 06:35:05

问题


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.


回答1:


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/



来源:https://stackoverflow.com/questions/60917574/trigger-lambda-from-a-button-in-a-static-website-in-s3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!