[英]Creating AWS Lambda Triggers Programmatically
I have an AWS Lambda function that takes in and processes logs from CloudWatch Logs that are sent to specific log groups.我有一个 AWS Lambda function,它从 CloudWatch Logs 接收并处理发送到特定日志组的日志。 The thing is, I may need to add more triggers as more log groups are created.
问题是,随着创建更多日志组,我可能需要添加更多触发器。 The only way I have found to create a trigger for a specific log group is to use the AWS Lambda console and the AWS CloudFront console.
我发现为特定日志组创建触发器的唯一方法是使用 AWS Lambda 控制台和 AWS CloudFront 控制台。 Is it possible to create a trigger for an AWS Lambda function programmatically?
是否可以通过编程方式为 AWS Lambda function 创建触发器? For instance, in some Java code?
例如,在一些 Java 代码中?
Yes, one of the common ways of triggering server-less functions is using endpoints.是的,触发无服务器功能的一种常见方法是使用端点。 I believe you can expose an API endpoint from the Function's console using a an API Gateway , and call this endpoint URL from your java code or whatever programmatic entity you wish.
我相信您可以使用API 网关从 Function 的控制台公开一个 API 端点,并从您的 java 代码或您希望的任何编程实体调用此端点 URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.