🟢

ECS Tasks Invoked by EventBridge

Amazon EventBridge can directly trigger ECS tasks in response to specific events, enabling event-driven containerized workloads.

Example – Event-Based Invocation

  1. Client action → An object is uploaded to an S3 bucket.
  1. EventBridge captures the event and matches it to a defined rule.
  1. The rule invokes an ECS Task running on AWS Fargate.
  1. The ECS task:
      • Reads the object from S3.
      • Processes or transforms the data.
      • Stores the result in DynamoDB.
  1. The task uses a dedicated IAM Role with S3 and DynamoDB permissions.
Use Cases: Media transcoding, data transformation, automated document processing.
Key Benefit: Fully serverless event-driven processing with Fargate, EventBridge, S3, and DynamoDB.

ECS Tasks Invoked by EventBridge Schedule

EventBridge can also trigger ECS tasks on a recurring schedule, replacing the need for a dedicated cron server.

Example – Scheduled Invocation

  1. EventBridge schedule rule runs at a fixed interval (e.g., every hour).
  1. The rule invokes a new ECS Task using AWS Fargate.
  1. The task executes batch logic, such as:
      • Reading/writing data in Amazon S3.
      • Performing calculations or cleanup tasks.
  1. The ECS task uses a specific IAM Role with the required resource permissions.
Use Cases: Log aggregation, periodic cleanup, scheduled data export or transformation.
Key Benefit: Time-based, serverless task automation without managing EC2 or cron infrastructure.