I have a use case where I need to run a function daily at 12:00:00 am. My Python code takes 3-4 seconds to initialize and 3 seconds to execute. It would still be fine if my function is triggered within 1 second after 12:00:00 am, but I can't do it with AWS Lambda triggered by AWS CloudWatch.
I have created a AWS Lambda function and it's being triggered every 11:59 pm using AWS CloudWatch Events because it does not provide second level precision. So, it's wasting computing time averaging between 15 - 45 seconds after initializing just to sleep until 12:00:00 am.
Although the price is still quite low, but I just felt annoyed that the majority (>75%) of the computing time taken is used to Sleep. Anyone else has a better idea?
