To automate the invocation of an AWS Lambda function at the end of each day, you can use Amazon EventBridge (formerly known as CloudWatch Events) to create a scheduled rule.
Create a Scheduled EventBridge Rule:
Open the Amazon EventBridge console at Amazon EventBridge Console.
Choose Create rule.
Provide a name and description for the rule.
For Rule type, choose Schedule.
Define a cron expression that runs the rule at the end of each day. For example, cron(0 0 * * ? *) runs the function at midnight UTC.
Set the Target:
In the Targets section, choose Add target.
For Target type, select Lambda function.
Choose the Lambda function you want to invoke.
Create the Rule:
Review the settings and choose Create rule.
This setup ensures that the Lambda function runs automatically at the specified time every day.
Amazon EventBridge Scheduler
Managing EventBridge Rules
Submit