Question:
I’ve got a lambda function and I would like to make sure that it’s never being called a second time if it’s already running. Is there any option to force this behavior?
Answer:
AWS Lambda currently doesn’t support this behavior. You could try using DynamoDB to create a lock, but that’s obviously not the most ideal scenario. Right now this use case isn’t a very good fit for Lambda.
I have a job that I need to ensure only one is ever running, and I wasn’t happy with any Lambda solution for that. I ended up just running it on a t2.nano instance.