steampipe plugin install aws

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_date
from
aws_scheduler_schedule;
select
name,
arn,
group_name,
creation_date
from
aws_scheduler_schedule;

List schedules with a specific state (Enabled)

Identify all schedules that are currently enabled.

select
name,
arn,
state,
schedule_expression
from
aws_scheduler_schedule
where
state = 'ENABLED';
select
name,
arn,
state,
schedule_expression
from
aws_scheduler_schedule
where
state = 'ENABLED';

List schedules with flexible time windows

Fetch schedules that have flexible time windows configured.

select
name,
flexible_time_window,
schedule_expression
from
aws_scheduler_schedule
where
flexible_time_window is not null;
select
name,
flexible_time_window,
schedule_expression
from
aws_scheduler_schedule
where
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,
state
from
aws_scheduler_schedule
where
start_date is not null
and end_date is not null;
select
name,
start_date,
end_date,
state
from
aws_scheduler_schedule
where
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_schedules
from
aws_scheduler_schedule
group by
group_name;
select
group_name,
count(*) as total_schedules
from
aws_scheduler_schedule
group 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_completion
from
aws_scheduler_schedule
where
name = 'my-schedule';
select
name,
target,
action_after_completion
from
aws_scheduler_schedule
where
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_name
from
aws_scheduler_schedule
where
creation_date > now() - interval '30 days';
select
name,
creation_date,
state,
group_name
from
aws_scheduler_schedule
where
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_timezone
from
aws_scheduler_schedule
where
schedule_expression_timezone = 'UTC';
select
name,
schedule_expression,
schedule_expression_timezone
from
aws_scheduler_schedule
where
schedule_expression_timezone = 'UTC';

Schema for aws_scheduler_schedule

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
action_after_completiontextIndicates the action that EventBridge Scheduler applies after completion.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
arntextThe Amazon Resource Name (ARN) of the schedule.
creation_datetimestamp with time zoneThe time at which the schedule was created.
descriptiontextThe description of the schedule.
end_datetimestamp with time zoneThe date, in UTC, before which the schedule can invoke its target.
flexible_time_windowjsonbAllows you to configure a time window during which the schedule invokes the target.
group_nametext=The name of the schedule group associated with this schedule.
kms_key_arntextThe ARN for a customer managed KMS Key used for encryption.
last_modification_datetimestamp with time zoneThe time at which the schedule was last modified.
nametext=The name of the schedule.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
regiontextThe AWS Region in which the resource is located.
schedule_expressiontextThe expression that defines when the schedule runs.
schedule_expression_timezonetextThe timezone in which the scheduling expression is evaluated.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
start_datetimestamp with time zoneThe date, in UTC, after which the schedule can begin invoking its target.
statetext=Specifies whether the schedule is enabled or disabled.
targetjsonbThe schedule target.
titletextTitle 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