简体   繁体   English

每次我调用 S3 static 站点时,我如何触发 lambda function

[英]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 记录访问”)

  • Lambda updated key bucket Lambda 更新密钥桶
  • S3 static website Read bucket S3 static 网站读桶
  • S3 is called with route53 CNAME使用 route53 CNAME 调用 S3
  • Lambda function need a trigger for uptade bucket Lambda function 需要一个用于升级桶的触发器

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.

相关问题 我想要一个 s3 触发器的列表和详细信息映射到 lambda function - I want the list and details of a s3 trigger mapped with a lambda function 当s3中没有上传文件时,如何触发lambda? - How can I trigger lambda when there are no uploaded files in s3? 如何使用 lambda function 将文件从 s3 存储桶复制到 ec2 实例? - How do I copy a file from s3 bucket to ec2 instance using lambda function? 我应该如何将我的s3凭据传递给AWS上的Python lambda函数? - How should I pass my s3 credentials to Python lambda function on AWS? 我如何使用aws lambda函数和python在S3上上传大于2 mb的大图像 - how can i upload large image of around greater than 2 mb on S3 with aws lambda function with python 如何通过 Lambda function 将存储在 S3 中的文件(例如 Excel 文件)复制到 Google 云端硬盘中? - How can I copy a file stored in S3 - like an Excel file - into Google Drive via a Lambda function? 如何使用 AWS Lambda 函数从 S3 解码 a.gz 文件? - How can I decode a .gz file from S3 using an AWS Lambda function? 如何将 csv 文件从 Lambda 上传到 S3 存储桶? “[ERROR] KeyError: 'Records' 并且我的 lambda 函数也没有被 s3 触发 - How can I upload the csv files from Lambda to an S3 bucket? "[ERROR] KeyError: 'Records' and my lambda function is also not getting triggered by s3 从 S3 中删除 object 时触发 Lambda function - Trigger Lambda function when object is deleted from S3 当新对象到达S3存储桶时触发Lambda函数 - Trigger Lambda function when a new object arrives in S3 bucket
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM