steampipe plugin install aws

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_time
from
aws_redshift_event_subscription;
select
cust_subscription_id,
customer_aws_id,
status,
sns_topic_arn,
subscription_creation_time
from
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_time
from
aws_redshift_event_subscription
where
enabled is false;
select
cust_subscription_id,
customer_aws_id,
status,
enabled,
sns_topic_arn,
subscription_creation_time
from
aws_redshift_event_subscription
where
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_list
from
aws_redshift_event_subscription;
select
cust_subscription_id,
severity,
source_type,
event_categories_list,
source_ids_list
from
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 arn
from
aws_redshift_event_subscription as e
join aws_sns_topic as s on s.topic_arn = e.sns_topic_arn
where
s.kms_master_key_id is null;
select
e.cust_subscription_id,
e.status,
s.kms_master_key_id,
s.topic_arn as arn
from
aws_redshift_event_subscription as e
join aws_sns_topic as s on s.topic_arn = e.sns_topic_arn
where
s.kms_master_key_id is null;

Schema for aws_redshift_event_subscription

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
cust_subscription_idtext=The name of the Amazon Redshift event notification subscription.
customer_aws_idtextThe AWS customer account associated with the Amazon Redshift event notification subscription.
enabledbooleanA boolean value indicating whether the subscription is enabled or disabled
event_categories_listjsonbThe list of Amazon Redshift event categories specified in the event notification subscription.
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.
severitytextThe event severity specified in the Amazon Redshift event notification subscription.
sns_topic_arntextThe Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription.
source_ids_listjsonbA list of the sources that publish events to the Amazon Redshift event notification subscription.
source_typetextThe source type of the events returned by the Amazon Redshift event notification.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextThe status of the Amazon Redshift event notification subscription.
subscription_creation_timetimestamp with time zoneThe date and time the Amazon Redshift event notification subscription was created.
tagsjsonbA map of tags for the resource.
tags_srcjsonbThe list of tags for the event subscription.
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_redshift_event_subscription