简体   繁体   English

以编程方式创建 AWS Lambda 触发器

[英]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.

相关问题 AWS Lambda 在 DynamoDB 表更改时触发 SNS - AWS Lambda triggers SNS on DynamoDB table changes AWS lambda 触发 s3 object 推送但文件不存在 - AWS lambda triggers on s3 object push but file is not present 使用 Lambda 触发器时 AWS SQS 消息卡在传输中 - AWS SQS messages stuck in flight when using Lambda triggers 以编程方式安排一次 AWS Lambda 执行 - Programmatically schedule an AWS Lambda for one time execution 一个 aws lambda 函数可以一次处理多个触发器吗? - can one aws lambda function handle multiple triggers at once? 如何为使用 CloudFormation 模板创建的 AWS Lambda function 添加触发器? - How to add triggers for a AWS Lambda function created using a CloudFormation template? AWS SAM DockerBuildArgs 它在创建 lambda 图像时不添加它们 - AWS SAM DockerBuildArgs It does not add them when creating the lambda image 创建 AWS lambda function 以在 s3 存储桶中拆分 pdf 个文件 - Creating an AWS lambda function to split pdf files in a s3 bucket AWS Lambda:创建和下载 EXCEL 文件时出现编码问题 - AWS Lambda: encoding problem when creating and downloading EXCEL file 使用 python pyodbc 库创建 AWS Lambda function 抛出错误“模块‘pyodbc’没有属性‘connect’ - Creating AWS Lambda function using python pyodbc library throw an error "module 'pyodbc' has no attribute ' connect'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM