Skip to content

Schedule second-level precision Lambda executions

Back to posts


This is a review of how to schedule lambda function executions from your Unity game, at the second-level precision.

The simplest way to schedule a lambda execution is through CloudWatch, or EventBridge, however this approach does not offer second-level precision. The documentation states that function executions must be made on the minute. For strategy games where players can kickoff actions, like building or upgrading bases, it may not be the best approach. If the player hits the action input in the middle of a minute, and the build task takes 1 minute to complete, you have about 30 seconds of downtime because of the minute-level precision for EventBridge scheduling.

One way to solve this problem is to take a different approach, which is to use the AWS State Machine service and setup a step function. The Step Function can be scheduled based on an input value at the second-level precision. Checkout the video above for instructions on how to do this.

Repositories for this project

[Unity Project]

[Demo Lambda Function]


  • [None]