Scheduled batch execution is one way to perform processing asynchronously in batches. There are two main advantages of scheduled batch execution:
- Automation: Scheduled batch execution eliminates the need for manual task execution by running tasks at regular intervals. This enables automation of workflows, saving time and effort.
- Consistency: Using scheduled batch execution ensures tasks are performed at predetermined frequencies, maintaining consistent processing. This ensures data updates or processing occurs at the appropriate times.
The pattern using Lambda and EventBridge is a very simple design. EventBridge triggers Lambda at specified times. However, due to the timeout constraints of Lambda, this infrastructure pattern is not suitable for long-running processes.
The architecture of this infrastructure configuration is as follows:
Note
Before running make deploy
, ensure you have configured AWS credentials and set the correct region. Otherwise, you use single sign-on (SSO).
$ make deploy
The dependencies are Golang and AWS Serverless Application Model (SAM) CLI. Please make sure to install them beforehand.