Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Use scheduled events to invoke a Lambda function
The following code examples show how to create an Amazon Lambda function invoked by an Amazon EventBridge scheduled event.
- Java
-
- SDK for Java 2.x
-
Shows how to create an Amazon EventBridge scheduled event that invokes an Amazon Lambda function.
Configure EventBridge to use a cron expression to schedule when the Lambda function is invoked.
In this example, you create a Lambda function by using the Lambda Java runtime API.
This example invokes different Amazon services to perform a specific use case. This example demonstrates how to
create an app that sends a mobile text message to your employees that congratulates
them at the one year anniversary date.
For complete source code and instructions on how to set up and run, see the full example on
GitHub.
Services used in this example
DynamoDB
EventBridge
Lambda
Amazon SNS
- JavaScript
-
- SDK for JavaScript (v3)
-
Shows how to create an Amazon EventBridge scheduled event that invokes an Amazon Lambda function.
Configure EventBridge to use a cron expression to schedule when the Lambda function is invoked.
In this example, you create a Lambda function by using the Lambda JavaScript runtime API.
This example invokes different Amazon services to perform a specific use case. This example demonstrates how to
create an app that sends a mobile text message to your employees that congratulates
them at the one year anniversary date.
For complete source code and instructions on how to set up and run, see the full example on
GitHub.
This example is also available in the
Amazon SDK for JavaScript v3 developer guide.
Services used in this example
DynamoDB
EventBridge
Lambda
Amazon SNS
For a complete list of Amazon SDK developer guides and code examples, see
Using DynamoDB with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.