Table: aws_eventbridge_rule - Query AWS EventBridge Rule using SQL
The AWS EventBridge Rule is a component of Amazon EventBridge, a serverless event bus service that makes it easy to connect applications together using data from your own applications, integrated Software-as-a-Service (SaaS) applications, and AWS services. EventBridge delivers a stream of real-time data from event sources and routes that data to targets like AWS Lambda. It primarily ingests, filters, and delivers events so you can build new applications quickly, and get to market faster.
Table Usage Guide
The aws_eventbridge_rule
table in Steampipe provides you with information about EventBridge rules within AWS EventBridge. This table allows you, as a DevOps engineer, to query rule-specific details, including the rule name, ARN, state, description, schedule expression, and associated metadata. You can utilize this table to gather insights on rules, such as the rules associated with a specific event bus, the state of the rules (whether they are enabled or disabled), and more. The schema outlines the various attributes of the EventBridge rule for you, including the rule ARN, event bus name, description, state, and associated tags.
Examples
Basic info
Gain insights into the status and origins of your AWS EventBridge rules. This query is particularly useful for auditing and maintaining an overview of your EventBridge settings.
select name, arn, state, created_by, event_bus_namefrom aws_eventbridge_rule;
select name, arn, state, created_by, event_bus_namefrom aws_eventbridge_rule;
List disabled rules
Determine the areas in which AWS EventBridge rules are not active. This is useful for identifying potential gaps in event-driven workflows or areas where automation may have been turned off.
select name, arn, state, created_byfrom aws_eventbridge_rulewhere state != 'ENABLED';
select name, arn, state, created_byfrom aws_eventbridge_rulewhere state != 'ENABLED';
Get the target information for each rule
This query allows you to identify the target details for each rule in your AWS EventBridge service. It's useful for auditing and understanding the relationships and dependencies between different rules and their targets within your AWS infrastructure.
select name, cd ->> 'Id' as target_id, cd ->> 'Arn' as target_arn, cd ->> 'RoleArn' as role_arnfrom aws_eventbridge_rule, jsonb_array_elements(targets) as cd;
select name, json_extract(cd.value, '$.Id') as target_id, json_extract(cd.value, '$.Arn') as target_arn, json_extract(cd.value, '$.RoleArn') as role_arnfrom aws_eventbridge_rule, json_each(targets) as cd;
Schema for aws_eventbridge_rule
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
arn | text | The Amazon Resource Name (ARN) of the rule. | |
created_by | text | The account ID of the user that created the rule. | |
description | text | The description of the rule. | |
event_bus_name | text | = | The name or ARN of the event bus associated with the rule. |
event_pattern | jsonb | The event pattern of the rule. | |
managed_by | text | If this is a managed rule, created by an AWS service on your behalf, this field displays the principal name of the AWS service that created the rule. | |
name | text | = | The name of the rule. |
name_prefix | text | = | Specifying this limits the results to only those event rules with names that start with the specified prefix. |
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. | |
role_arn | text | The Amazon Resource Name (ARN) of the IAM role associated with the rule. | |
schedule_expression | text | The scheduling expression. For example, 'cron(0 20 * * ? *)', 'rate(5 minutes)'. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | text | The state of the rule. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | A list of tags assigned to the rule. | |
targets | jsonb | The targets assigned to the rule. | |
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_eventbridge_rule