简体   繁体   中英

Lambda function concurrent invocation per event trigger

I have a lambda function that is is logging into a server on a specific interval, defined from a CloudWatch event rule. There are multiple servers that need to be logged into on different intervals, each defined by their own respective CloudWatch event rule. However, I only want one lambda function invocation hitting a specific server at a time. Can each CloudWatch event rule be limited to just one lambda function invocation at a time, or would I have to create a duplicate lambda function for each specific CloudWatch event rule and set the concurrent invocation to 1 that way? I was hoping to avoid that as it just adds duplicate lambda functions. I'd just want to keep it simple, if possible.

If you know the IDs of these instances, you can pass them as arguments to your CloudWatch Event rules in the form of constant :

在此处输入图片说明

Your single function would get the ID of the instance from the event object and perform operations on that one specific instance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM