steampipe plugin install aws

Table: aws_redshiftserverless_workgroup - Query AWS Redshift Serverless Workgroup using SQL

The AWS Redshift Serverless Workgroup is a feature of Amazon Redshift that enables you to separate query processing among different sets of users. It allows you to manage query concurrency, memory allocation, and user access for better performance and security. Through SQL, you can query and analyze the workgroup's configurations and usage statistics.

Table Usage Guide

The aws_redshiftserverless_workgroup table in Steampipe provides you with information about workgroups within AWS Redshift Serverless. This table allows you as a DevOps engineer to query workgroup-specific details, including query execution settings, enforce workgroup configuration, and associated metadata. You can utilize this table to gather insights on workgroups, such as workgroup settings, enforced configurations, query execution details, and more. The schema outlines the various attributes of the Redshift Serverless workgroup for you, including the workgroup name, state, creation time, and associated tags.

Examples

Basic info

Explore which AWS Redshift Serverless Workgroups are available and assess their status. This can help in efficiently managing resources and understanding server capacity.

select
workgroup_name,
workgroup_arn,
workgroup_id,
base_capacity,
creation_date,
region,
status
from
aws_redshiftserverless_workgroup;
select
workgroup_name,
workgroup_arn,
workgroup_id,
base_capacity,
creation_date,
region,
status
from
aws_redshiftserverless_workgroup;

List unavailable workgroups

Determine the areas in which workgroups are not currently available. This is useful for identifying potential issues or bottlenecks within your AWS Redshift serverless environment.

select
workgroup_name,
workgroup_arn,
workgroup_id,
base_capacity,
creation_date,
region,
status
from
aws_redshiftserverless_workgroup
where
status <> 'AVAILABLE';
select
workgroup_name,
workgroup_arn,
workgroup_id,
base_capacity,
creation_date,
region,
status
from
aws_redshiftserverless_workgroup
where
status != 'AVAILABLE';

List publicly accessible workgroups

Discover the segments that are publicly accessible within your workgroups. This is useful for understanding potential security risks and which areas of your system may be exposed to the public.

select
workgroup_name,
workgroup_arn,
workgroup_id,
base_capacity,
creation_date,
region,
status
from
aws_redshiftserverless_workgroup
where
publicly_accessible;
select
workgroup_name,
workgroup_arn,
workgroup_id,
base_capacity,
creation_date,
region,
status
from
aws_redshiftserverless_workgroup
where
publicly_accessible = 1;

Get total base capacity utilized by available workgroups

Determine the total capacity utilized by all available workgroups in your AWS Redshift Serverless environment. This is useful for understanding the extent of your resource usage and planning for future capacity needs.

select
sum(base_capacity) total_base_capacity
from
aws_redshiftserverless_workgroup
where
status = 'AVAILABLE';
select
sum(base_capacity) total_base_capacity
from
aws_redshiftserverless_workgroup
where
status = 'AVAILABLE';

Get endpoint details of each workgroups

Discover the segments that provide details about the endpoints of each workgroup in your AWS Redshift serverless environment. This can be beneficial when you need to understand the connectivity details of your serverless workgroups for auditing or troubleshooting purposes.

select
workgroup_arn,
endpoint ->> 'Address' as endpoint_address,
endpoint ->> 'Port' as endpoint_port,
endpoint -> 'VpcEndpoints' as endpoint_vpc_details
from
aws_redshiftserverless_workgroup;
select
workgroup_arn,
json_extract(endpoint, '$.Address') as endpoint_address,
json_extract(endpoint, '$.Port') as endpoint_port,
json_extract(endpoint, '$.VpcEndpoints') as endpoint_vpc_details
from
aws_redshiftserverless_workgroup;

List config parameters associated with each workgroup

Discover the segments that contain specific configurations in each workgroup to understand how they are set up and operate. This can be particularly useful for auditing, debugging, or optimization purposes.

select
workgroup_arn,
p ->> 'ParameterKey' as parameter_key,
p ->> 'ParameterValue' as parameter_value
from
aws_redshiftserverless_workgroup,
jsonb_array_elements(config_parameters) p;
select
workgroup_arn,
json_extract(p.value, '$.ParameterKey') as parameter_key,
json_extract(p.value, '$.ParameterValue') as parameter_value
from
aws_redshiftserverless_workgroup,
json_each(config_parameters) as p;

Schema for aws_redshiftserverless_workgroup

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.
base_capacitybigintThe base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs).
config_parametersjsonbAn array of parameters to set for finer control over a database.
creation_datetimestamp with time zoneThe creation date of the workgroup.
cross_account_vpcsjsonbA list of VPCs. Each entry is the unique identifier of a virtual private cloud with access to Amazon Redshift Serverless.
custom_domain_certificate_arntextThe custom domain name certificate Amazon resource name (ARN).
custom_domain_certificate_expiry_timetimestamp with time zoneThe expiration time for the certificate.
custom_domain_nametextThe custom domain name associated with the workgroup.
endpointjsonbThe endpoint that is created from the workgroup.
enhanced_vpc_routingbooleanThe value that specifies whether to enable enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC.
max_capacitybigintThe maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries.
namespace_nametextThe namespace the workgroup is associated with.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
patch_versiontextThe patch version of your Amazon Redshift Serverless workgroup.
publicly_accessiblebooleanA value that specifies whether the workgroup can be accessible from a public network.
regiontextThe AWS Region in which the resource is located.
security_group_idsjsonbAn array of security group IDs to associate with the workgroup.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextThe status of the workgroup.
subnet_idsjsonbAn array of subnet IDs the workgroup is associated with.
tagsjsonbA map of tags for the resource.
tags_srcjsonbThe list of tags for the workgroup.
titletextTitle of the resource.
workgroup_arntextThe Amazon Resource Name (ARN) that links to the workgroup.
workgroup_idtextThe unique identifier of the workgroup.
workgroup_nametext=The name of the workgroup.

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_redshiftserverless_workgroup