Table: aws_scheduler_schedule - Query AWS EventBridge Schedules using SQL
The AWS EventBridge Scheduler is a fully managed service that enables automated task execution at specific times or intervals. It allows you to define schedules for running tasks, managing workflows, and automating processes across AWS services. Schedules can be one-time or recurring, using expressions such as rate
, cron
, or at
.
Table Usage Guide
The aws_scheduler_schedule
table in Steampipe provides information about schedules configured in AWS EventBridge Scheduler. This table allows DevOps engineers, system administrators, and cloud professionals to query schedule-specific details, such as schedule expressions, start and end times, flexible time windows, target configurations, and states.
The schema outlines key attributes of the schedule, including its name, ARN, associated group, creation date, schedule state, and metadata. You can use this table to monitor schedules, identify configuration details, and optimize automation workflows.
Examples
Basic info
Retrieve the name, ARN, group name, and creation date of all schedules in your AWS account.
select name, arn, group_name, creation_datefrom aws_scheduler_schedule;
select name, arn, group_name, creation_datefrom aws_scheduler_schedule;
List schedules with a specific state (Enabled)
Identify all schedules that are currently enabled.
select name, arn, state, schedule_expressionfrom aws_scheduler_schedulewhere state = 'ENABLED';
select name, arn, state, schedule_expressionfrom aws_scheduler_schedulewhere state = 'ENABLED';
List schedules with flexible time windows
Fetch schedules that have flexible time windows configured.
select name, flexible_time_window, schedule_expressionfrom aws_scheduler_schedulewhere flexible_time_window is not null;
select name, flexible_time_window, schedule_expressionfrom aws_scheduler_schedulewhere flexible_time_window is not null;
Retrieve schedules with start and end dates
Identify schedules that have both start and end dates defined.
select name, start_date, end_date, statefrom aws_scheduler_schedulewhere start_date is not null and end_date is not null;
select name, start_date, end_date, statefrom aws_scheduler_schedulewhere start_date is not null and end_date is not null;
List schedules grouped by their schedule group
Fetch schedules and group them based on their schedule group name.
select group_name, count(*) as total_schedulesfrom aws_scheduler_schedulegroup by group_name;
select group_name, count(*) as total_schedulesfrom aws_scheduler_schedulegroup by group_name;
Analyze target configurations for specific schedules
Retrieve the target configurations, including the action and resource details, for specific schedules.
select name, target, action_after_completionfrom aws_scheduler_schedulewhere name = 'my-schedule';
select name, target, action_after_completionfrom aws_scheduler_schedulewhere name = 'my-schedule';
Fetch schedules created in the last 30 days
Identify newly created schedules within the past month for auditing or review.
select name, creation_date, state, group_namefrom aws_scheduler_schedulewhere creation_date > now() - interval '30 days';
select name, creation_date, state, group_namefrom aws_scheduler_schedulewhere creation_date > datetime('now', '-30 days');
Retrieve schedules with specific time zones
Fetch schedules where the schedule expression is evaluated in a specific time zone.
select name, schedule_expression, schedule_expression_timezonefrom aws_scheduler_schedulewhere schedule_expression_timezone = 'UTC';
select name, schedule_expression, schedule_expression_timezonefrom aws_scheduler_schedulewhere schedule_expression_timezone = 'UTC';
Schema for aws_scheduler_schedule
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
action_after_completion | text | Indicates the action that EventBridge Scheduler applies after completion. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
arn | text | The Amazon Resource Name (ARN) of the schedule. | |
creation_date | timestamp with time zone | The time at which the schedule was created. | |
description | text | The description of the schedule. | |
end_date | timestamp with time zone | The date, in UTC, before which the schedule can invoke its target. | |
flexible_time_window | jsonb | Allows you to configure a time window during which the schedule invokes the target. | |
group_name | text | = | The name of the schedule group associated with this schedule. |
kms_key_arn | text | The ARN for a customer managed KMS Key used for encryption. | |
last_modification_date | timestamp with time zone | The time at which the schedule was last modified. | |
name | text | = | The name of the schedule. |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
region | text | The AWS Region in which the resource is located. | |
schedule_expression | text | The expression that defines when the schedule runs. | |
schedule_expression_timezone | text | The timezone in which the scheduling expression is evaluated. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
start_date | timestamp with time zone | The date, in UTC, after which the schedule can begin invoking its target. | |
state | text | = | Specifies whether the schedule is enabled or disabled. |
target | jsonb | The schedule target. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_scheduler_schedule