DEV Community

Cover image for How EventBridge Scheduler simplifies task coordination with 270+ AWS services and 6,000+ APIs
Augusto Valdivia for AWS Community Builders

Posted on • Updated on

How EventBridge Scheduler simplifies task coordination with 270+ AWS services and 6,000+ APIs

How many AWS resources can you schedule with Amazon EventBridge, Do you know?

Let me introduce you to EventBridge and its amazing features before answering this question.

What Is Amazon EventBridge?

EventBridge is a service that operates without the need for servers(serverless) and utilizes events to establish connections between different components of an application.

How does Amazon EventBridge works?

Amazon EventBridge simplifies the process of building scalable applications that are driven by events. By implementing an event-driven architecture, software systems can be constructed in a loosely-coupled manner, where components emit and respond to events. This approach enhances agility and enables the creation of reliable and scalable applications.

What are some of the features of EventBridge and how do they work?

Amazon EventBridge Event Bus is a serverless event bus that facilitates the receipt, filtration, conversion, routing, and distribution of events. With this feature, integrating application services becomes simpler as you can use event data without the need to write custom integration code.

The event bus handles provisioning, patching, and server management, reducing your operational overhead. Moreover, there is no additional software required for installation, maintenance, or operation.

Amazon EventBridge Pipes allows for serverless point-to-point integration by connecting event producers to consumers. It also provides additional capabilities such as filtering, enrichment, and transformation.

The benefits of using Amazon EventBridge Pipes include simplified integration creation through a user-friendly interface, reduced costs through event filters and built-in integrations, real-time event delivery to over 14 AWS services, and secure and reliable service connections without the need for scalability, security, patching, or infrastructure provisioning.

Amazon EventBridge Scheduler is a serverless tool that allows you to schedule tasks and events on a large scale. It offers various options for scheduling patterns, delivery windows, and retry policies to ensure that your important tasks and events are triggered reliably when needed.

One of the main benefits it provides is the advantage of pre-built integrations, which allow you to invoke over 200 AWS services, which is nearly 90% of all available AWS services, with over 6,000 APIs without the need for custom code 🀯. Additionally, it scales your scheduling automatically to manage millions of tasks and events to meet customer demand.

How Amazon EventBridge Scheduler works?

It operates as a pay-per-invoke task and event scheduler. This means that you are charged based on the number of times you use it to trigger tasks and events. It is designed to trigger based on the parameters you define, which allows you to customize the way it works to meet your specific needs.

You can manage all your scheduled jobs from a single central location using an easy-to-use list view. This means that you can easily view and manage all your scheduled tasks and events in one place, making it simpler to keep track of everything.

Now that we have a basic understanding of what Amazon EventBridge is and some of the amazing features it offers, the rest of the blog post will focus on the Amazon EventBridge Scheduler and one of its new capabilities. Before proceeding, let's address the question posed at the beginning of this blog.

The answer is:

  • 270+ AWS services and 6,000+ APIs πŸš€. Powerful, isn't it?

πŸ”ŠFeature updateπŸ”Š

On August 2, 2023, AWS announced that you can now configure Amazon EventBridge Scheduler schedules to be automatically deleted once the last invocation is complete. This new feature applies to one-time, cron, and rate schedules with an end date. As if that wasn't enough, this latest capability further enhances the functionality of Amazon EventBridge Scheduler.

What else is here for us?

If you've been keeping up with my articles, you're probably aware that I like to conclude them in an interesting way. My aim is to provide you with the chance to not just learn about theory, but also to acquire practical skills and experience by creating something amazing on AWS.

πŸ›  It's project time ⏰

In the diagram below, you can observe a selection of the numerous services that are schedulable using the Amazon EventBridge scheduler. In this project, we will use Terraform to finalize the setup of this serverless infrastructure.

Diagram

Congratulations on completing reading this blog and I hope you enjoyed it. Now it's time for you to take a well-deserved break. Why not grab a cup of coffee or take a refreshing walk outside?

Please stay tuned and I'm inviting you to subscribe to this blog to receive an alarm 🚨 notifying you when I have added the repository section to this blog.

🍭Extras technical terms🍭:

  • Event-driven architecture: a style of building software systems that work together by emitting and responding to events
  • Loosely-coupled: components that are not tightly connected, allowing for flexibility in the system
  • Scalable: able to handle increased demand or growth

🚨Here's the link to the repository section of this blog!🚨

I'm all set to resume building on AWS. Are you ready too?

The GitHub repository and deployment instructions for two separate projects are at the link below. Through hands-on experience, you can learn to configure cross-account policy permissions and utilize serverless resources such as EventBriged and Lambda to automate data pipelines between distinct accounts.

GitHub-Repository

Diagram

Code previews

#--main/EB--

resource "aws_cloudwatch_event_rule" "lambda_trigger" {
  name        = "daily-lambda-trigger"
  description = "Trigger Lambda daily at 18:00 UTC"
  schedule_expression = "cron(0 18 * * ? *)"
}

resource "aws_cloudwatch_event_target" "lambda_target" {
  rule      = aws_cloudwatch_event_rule.lambda_trigger.name
  target_id = "lambda-target"
  arn       = aws_lambda_function.copy_s3_objects.arn
}



resource "aws_lambda_permission" "allow_uhn_event_rule_schedule" {
  statement_id = "AllowExecutionFromCloudWatch"
  action = "lambda:InvokeFunction"
  function_name = aws_lambda_function.copy_s3_objects.function_name
  principal = "events.amazonaws.com"
  source_arn = aws_cloudwatch_event_rule.lambda_trigger.arn
}

Enter fullscreen mode Exit fullscreen mode

Please don't forget to share your comments and follow me for more AWSome content.

Top comments (0)