Reputation: 746
I have written a python script for autoscaling server naming. which will check current servers in autoscaling and give an appropriate name and sequence to the new server.
I am triggering my Aws lambda function by autoscaling event. and when I bring 3 servers at the same time(or new autoscaling with desired capacity 10) I don't want lambda to be executed parallelly. it is making my script assign the same count for all servers.
Or if I can implement some kind of locking to put other lambdas in wait state. So what should i used for it.
Upvotes: 1
Views: 1989
Reputation: 2943
There are 2 options:
You can make use of the step functions to implement this scenario. With step functions you can check if one is already running and skip.
Read more about step functions here: https://aws.amazon.com/step-functions/
Upvotes: 2