Using EventBridge Scheduler to Implement Custom TTL Logic

Using EventBridge Scheduler to Implement Custom TTL Logic
Using EventBridge Scheduler to Implement Custom TTL Logic

CLOUD LABS



Using EventBridge Scheduler to Implement Custom TTL Logic

In this Cloud Lab, you’ll learn to build an OTP-based password reset system using AWS DynamoDB, Lambda, and EventBridge to manage secure authentication and automated data cleanup.

7 Tasks

beginner

1hr 30m

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

The ability to schedule automated clean-up tasks using EventBridge schedules
An understanding of DynamoDB for managing user authentication data
Hands-on experience invoking AWS Lambda functions for backend automation
Hands-on experience integrating Flask applications with AWS backend services

Technologies
EventBridge logoEventBridge
DynamoDB logoDynamoDB
Cloud Lab Overview

Modern cloud applications often rely on event-driven architectures to respond to data changes in real time, eliminating the need for manual intervention. Amazon DynamoDB, AWS Lambda, and Amazon EventBridge collectively form the backbone of such systems, enabling developers to create scalable, automated workflows that drive business growth. Learning how to connect these services allows developers to build serverless solutions that respond instantly to user actions, trigger workflows, and handle background tasks efficiently.

In this Cloud Lab, you’ll implement an OTP-based authentication system powered by AWS serverless services. You’ll start by creating DynamoDB tables for storing user data and OTP codes, and enabling DynamoDB Streams to trigger a Lambda function whenever a new OTP is added. Finally, you’ll use EventBridge to schedule automatic OTP deletions, ensuring expired entries are cleaned up.

By the end of this Cloud Lab, you’ll gain practical experience building a fully serverless, event-driven workflow that reacts to database updates and performs scheduled cleanup. This skill set is highly relevant for developers designing scalable authentication systems, IoT backends, or real-time data processing pipelines on AWS.

The following is the high-level architecture diagram of the infrastructure you will create in this Cloud Lab:

Managing temporary passwords with custom TTL logic using EventBridge
Managing temporary passwords with custom TTL logic using EventBridge

Cloud Lab Tasks
1.Introduction
Getting Started
2.Set Up Services
Create a DynamoDB Table
Create a Lambda Function to Set the EventBridge Schedule
3.Add TTL to Application
Enable the Stream and Add a Trigger
View the Demo Application
4.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.

Hear what others have to say
Join 1.4 million developers working at companies like