Table: aws_redshift_event_subscription - Query AWS Redshift Event Subscriptions using SQL
The AWS Redshift Event Subscription is a feature of Amazon Redshift that allows you to subscribe to events related to your clusters, snapshots, security groups, and parameter groups. This service sends notifications to the Amazon Simple Notification Service (SNS) when specific events occur, enabling you to automate responses to these events. It provides a streamlined process for managing and responding to events in your Amazon Redshift environment.
Table Usage Guide
The aws_redshift_event_subscription
table in Steampipe provides you with information about event subscriptions within Amazon Redshift. This table allows you to query event subscription-specific details, including the subscription's configuration, status, and associated Redshift clusters. You can utilize this table to gather insights on event subscriptions, such as the event categories subscribed to, the status of the subscription, and the Redshift clusters associated with the subscription. The schema outlines the various attributes of the Redshift event subscription, including the subscription name, enabled status, event categories, source type, severity, and associated tags.
Examples
Basic info
Explore which AWS Redshift event subscriptions are active, by assessing elements like their status and creation time. This can help in managing and monitoring your AWS resources effectively.
select cust_subscription_id, customer_aws_id, status, sns_topic_arn, subscription_creation_timefrom aws_redshift_event_subscription;
select cust_subscription_id, customer_aws_id, status, sns_topic_arn, subscription_creation_timefrom aws_redshift_event_subscription;
List disabled event subscriptions
Identify instances where event subscriptions have been disabled in AWS Redshift. This is useful for auditing purposes, ensuring that all necessary subscriptions are active and functioning as expected.
select cust_subscription_id, customer_aws_id, status, enabled, sns_topic_arn, subscription_creation_timefrom aws_redshift_event_subscriptionwhere enabled is false;
select cust_subscription_id, customer_aws_id, status, enabled, sns_topic_arn, subscription_creation_timefrom aws_redshift_event_subscriptionwhere enabled = 0;
Get associated source details for each event subscription
Determine the areas in which event subscriptions are associated with different sources in your AWS Redshift environment. This can help prioritize and manage events based on their source and severity.
select cust_subscription_id, severity, source_type, event_categories_list, source_ids_listfrom aws_redshift_event_subscription;
select cust_subscription_id, severity, source_type, event_categories_list, source_ids_listfrom aws_redshift_event_subscription;
List unencrypted SNS topics associated with each event subscription
Explore which event subscriptions are associated with unencrypted SNS topics. This can help identify potential security risks in your AWS Redshift environment.
select e.cust_subscription_id, e.status, s.kms_master_key_id, s.topic_arn as arnfrom aws_redshift_event_subscription as e join aws_sns_topic as s on s.topic_arn = e.sns_topic_arnwhere s.kms_master_key_id is null;
select e.cust_subscription_id, e.status, s.kms_master_key_id, s.topic_arn as arnfrom aws_redshift_event_subscription as e join aws_sns_topic as s on s.topic_arn = e.sns_topic_arnwhere s.kms_master_key_id is null;
Query examples
Schema for aws_redshift_event_subscription
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. | |
cust_subscription_id | text | = | The name of the Amazon Redshift event notification subscription. |
customer_aws_id | text | The AWS customer account associated with the Amazon Redshift event notification subscription. | |
enabled | boolean | A boolean value indicating whether the subscription is enabled or disabled | |
event_categories_list | jsonb | The list of Amazon Redshift event categories specified in the event notification subscription. | |
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. | |
severity | text | The event severity specified in the Amazon Redshift event notification subscription. | |
sns_topic_arn | text | The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription. | |
source_ids_list | jsonb | A list of the sources that publish events to the Amazon Redshift event notification subscription. | |
source_type | text | The source type of the events returned by the Amazon Redshift event notification. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | The status of the Amazon Redshift event notification subscription. | |
subscription_creation_time | timestamp with time zone | The date and time the Amazon Redshift event notification subscription was created. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | The list of tags for the event subscription. | |
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_redshift_event_subscription