We are running the C# asp.net core application using AWS Lambda service.
To run some calculation we used to call an API method of our app. However, now we need to do it automatically. It means that we need to run a scheduled task (or several separate tasks in the future) each minute. There is a mandatory condition that only one instance of the task should be running simultaneously. In case of a standard service or container, we could use a 3rd party library such as Hangfire or Quartz. However, in the case of Lambda, they can be run stable because of two reasons:
- Several Lambdas can start the same task at once.
- Lambdas can be in sleep mode when we need to run the task.
Is there any way to solve my issue with AWS services?
Probably we can schedule a job which will call one of our method which will run the task (but in this case, how can we prevent to call this method out of our infrastructure?)
Or can we configure LambdaEntryPoint in our code in some way to solve it?