You get an SDK timeout. To resolve this issue, complete the steps in the Fix SDK timeouts section.
You get a function timeout. To resolve this issue, complete the steps in the Prevent function timeouts section.
An Amazon EventBridge rule didn't start. To resolve this issue, complete the steps in the Verify that your scheduled rule was invoked section.
Your function is throttling. To resolve this issue, complete the steps in the Prevent function throttling section.
You get duplicate Lambda invokes. To resolve this issue, complete the steps in the Prevent errors by using idempotency section.
Note: The AWS Instance Scheduler runs Lambda functions at set intervals using an EventBridge rule to schedule the Lambda function. This results in an asynchronous invocation of the Lambda function, which affects on how function errors are handled. If the function fails due to an error when running, the same event is retried up to two more times by default. Then, the event is discarded. If throttles occur, then the event can be queued for up to six hours before the event is discarded.
Fix SDK timeouts
The default SDK timeout isn't overridden in earlier versions of the AWS Instance Scheduler. If the API call to start or stop an instance takes longer than 60 seconds to respond in the earlier versions, then the request times out.
Instances can take a few minutes to reach the RUNNING state. Your function can time out if the time to reach the RUNNING state is longer than the configured timeout for the function. To resolve this issue, increase the timeout for your function by modifying the Timeout value of 300 (5 minutes) in your AWS CloudFormation template. You must have enough time for the instance to launch before the function times out. For example:
For asynchronous invokes, Lambda throttles on your account can affect the ability of your function to be invoked. All asynchronous invocations are sent to an event queue before they are invoked. If another function received a high number of asynchronous invokes too, then your event queue can get backlogged. This backlog doesn't mean that your function failed to invoke. This backlog means that the event has been delayed. You can see multiple invokes after the event queue backlog is cleared. By default, events in your asynchronous event queue remain in the asynchronous event queue for up to six hours.