# AWS EventBridge Rules (UTC Only) vs EventBridge Scheduler (IANA Timezones)

> Why legacy CloudWatch / EventBridge Rules ignore local timezones and DST, and how to migrate to AWS EventBridge Scheduler with ScheduleExpressionTimezone.

- **Canonical URL**: https://opslint.dev/cron/aws-eventbridge-rules-utc-vs-scheduler-timezone/
- **Category**: `CRON`
- **Interactive Workbench**: [Open in Live Workbench](https://opslint.dev/cron/#expr=0%208%20%3F%20*%20MON-FRI%20*&tz=America%2FNew_York&dialect=aws-eventbridge)
- **Normative Specifications**: `AWS EventBridge PutRule API (UTC-Only ScheduleExpression)`, `AWS EventBridge Scheduler CreateSchedule API (ScheduleExpressionTimezone)`, `AWS Service Quotas: EventBridge Rules (300/bus) vs Scheduler (1,000,000/region)`

## Incident Symptom & Root Cause

**Production Symptom**: Lambda functions triggered by aws_cloudwatch_event_rule shift one hour earlier or later for local users every March and November, or Terraform apply fails when trying to pass schedule_expression_timezone on an aws_cloudwatch_event_rule resource.

**Protocol / Engine Root Cause**: AWS has two separate scheduling APIs under the EventBridge brand: legacy EventBridge Rules (events:PutRule / CloudWatch Events) evaluate all cron() expressions exclusively in UTC with zero timezone parameter, whereas EventBridge Scheduler (scheduler:CreateSchedule, launched late 2022) natively supports IANA ScheduleExpressionTimezone, flexible time windows, one-time at() schedules, and 1M+ schedules per account.

## Remediation Diff (Broken vs Verified Fix)

### Legacy EventBridge Rule Hardcoding Winter EST Offset in UTC

```text
# Legacy events:PutRule API (aws_cloudwatch_event_rule):
# Runs at 08:00 EST in winter, but shifts to 09:00 EDT all summer!
resource "aws_cloudwatch_event_rule" "daily_open" {
  name                = "ny-market-prep"
  schedule_expression = "cron(0 13 ? * MON-FRI *)"
}

resource "aws_cloudwatch_event_target" "lambda" {
  rule = aws_cloudwatch_event_rule.daily_open.name
  arn  = aws_lambda_function.market_prep.arn
}
```

### EventBridge Scheduler with Native IANA Timezone & Retry Policy

```text
# Modern scheduler:CreateSchedule API (aws_scheduler_schedule):
# Automatically tracks America/New_York EST (-05:00) and EDT (-04:00)!
resource "aws_scheduler_schedule" "daily_open" {
  name       = "ny-market-prep"
  group_name = "production-jobs"

  schedule_expression          = "cron(0 8 ? * MON-FRI *)"
  schedule_expression_timezone = "America/New_York"

  flexible_time_window {
    mode = "OFF" # Or "FLEXIBLE" with maximum_window_in_minutes = 5 to smooth spikes
  }

  target {
    arn      = aws_lambda_function.market_prep.arn
    role_arn = aws_iam_role.scheduler_execution.arn
    retry_policy {
      maximum_retry_attempts       = 3
      maximum_event_age_in_seconds = 3600
    }
  }
}
```

## Engineering Deep Dive

The naming overlap between EventBridge Rules and EventBridge Scheduler trips up even experienced AWS architects. When you create a scheduled rule on the default event bus (aws_cloudwatch_event_rule in Terraform or AWS::Events::Rule in CloudFormation), AWS provisions a legacy bus rule capped at 300 rules per event bus by default, locked permanently to UTC, and authorized via resource-based policies such as aws_lambda_permission.

EventBridge Scheduler (aws_scheduler_schedule / AWS::Scheduler::Schedule) is a standalone purpose-built scheduling control plane that does not consume event bus rule quotas, scales to 1,000,000 schedules per region, supports native IANA timezone evaluation via ScheduleExpressionTimezone, and supports auto-deletion after completion (ActionAfterCompletion: DELETE) for ephemeral tasks.

One critical IAM change is required during migration: whereas EventBridge Rules invoke Lambda via aws_lambda_permission (principal events.amazonaws.com), EventBridge Scheduler assumes an execution IAM Role (target.role_arn with trust policy allowing scheduler.amazonaws.com to sts:AssumeRole) and uses that role's permissions to invoke Lambda, SQS, ECS RunTask, Step Functions, or over 270 AWS SDK actions directly.

## EventBridge Rules vs EventBridge Scheduler Architecture Comparison

| Case / Engine | Protocol Behavior | Production Remediation |
| :--- | :--- | :--- |
| **Timezone & DST handling** (`#eb-rules-vs-scheduler-tz`) | EventBridge Rules: strictly UTC only. EventBridge Scheduler: full IANA timezone support. | Migrate human-facing local schedules from aws_cloudwatch_event_rule to aws_scheduler_schedule. |
| **Target invocation auth** (`#eb-rules-vs-scheduler-iam`) | Rules use resource policies (events.amazonaws.com); Scheduler assumes target.role_arn (scheduler.amazonaws.com). | Attach sts:AssumeRole trust for scheduler.amazonaws.com with SourceAccount condition. |
| **Fleet thundering-herd control** (`#eb-flexible-time-window`) | Rules fire all targets at the exact second; Scheduler offers FlexibleTimeWindow jitter. | Set flexible_time_window { mode = 'FLEXIBLE', maximum_window_in_minutes = 10 } for non-urgent batch jobs. |
| **02:30 local during Spring DST** (`#eb-scheduler-dst-gap`) | EventBridge Scheduler skips nonexistent spring-forward wall times and runs once on second fall-back pass. | Keep Scheduler local cron times outside 01:00–03:00 when every calendar day must fire. |

## Frequently Asked Engineering Questions

### Why did my migrated EventBridge Scheduler silently fail to invoke Lambda even though the schedule is ENABLED?

Check your IAM execution role! If you copied an old aws_lambda_permission for events.amazonaws.com instead of granting lambda:InvokeFunction on the IAM role passed in target.role_arn (trusted by scheduler.amazonaws.com), invocations fail and route to your configured Dead-Letter Queue (DLQ)—always attach an SQS DLQ on target.dead_letter_config.

### Does EventBridge Scheduler charge extra compared to EventBridge Rules?

AWS includes 14 million free EventBridge Scheduler invocations per month under the AWS Free Tier, and $1.00 per million invocations thereafter—making typical cron fleets of dozens or hundreds of schedules effectively $0.00/month.

### Can EventBridge Scheduler run one-off future tasks without cron?

Yes. Scheduler supports at(yyyy-mm-ddThh:mm:ss) combined with ActionAfterCompletion = 'DELETE', replacing brittle DynamoDB TTL stream hacks for delayed customer reminders or trial expirations.

## Related Problem-Cluster Guides

- [Fix AWS EventBridge Cron ValidationException: The ? vs * Wildcard Rule](https://opslint.dev/cron/aws-eventbridge-question-mark-wildcard-error/) — Resolve AWS EventBridge Parameter ScheduleExpression is not valid errors caused by 5-field POSIX syntax or using * in both Day-of-Month and Day-of-Week.
- [Cron Jobs Skipped During Daylight Saving Time Spring Forward (02:00–02:59 Gap)](https://opslint.dev/cron/dst-spring-forward-skipped-jobs/) — Why 02:30 local cron schedules vanish on Kubernetes CronJob and AWS EventBridge while Vixie Cron runs catch-up at 03:00, and how to prevent missed runs.
- [Prevent Duplicate Cron Execution During Daylight Saving Time Fall Back (01:00–01:59 Overlap)](https://opslint.dev/cron/dst-fall-back-duplicate-execution/) — Diagnose and prevent double-firing cron jobs during the November DST fall-back hour across Kubernetes CronJob, Vixie Cron, and AWS EventBridge.
- [Schedule Cron Jobs for Market Hours (09:30–16:00 Mon–Fri in America/New_York)](https://opslint.dev/cron/business-hours-market-open-half-hour-cron/) — Why a single cron expression cannot start at 09:30 and end at 16:00 without skipping :00–:29 in later hours, and how to split half-hour trading windows cleanly.
