[英]How i trigger a lambda function every time I call a S3 static site
i have a lambda function that returns a json which is read by S3 static website, i need the lambda function to be triggered every time i access the static website, is there any way to do this? i have a lambda function that returns a json which is read by S3 static website, i need the lambda function to be triggered every time i access the static website, is there any way to do this? ("s3 is being accessed by a route53 record like CNAME")
(“s3 正被 CNAME 之类的 route53 记录访问”)
You can attach an api gateway as a trigger for the lambda function.您可以附加api 网关作为 lambda function 的触发器。 That way, every time a client accesses the website, the client can send a fetch request to the rest endpoint and the lambda would then return the json object that you are looking for.
That way, every time a client accesses the website, the client can send a fetch request to the rest endpoint and the lambda would then return the json object that you are looking for. Let me know if that helps.
让我知道这是否有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.