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, statusfrom aws_redshiftserverless_workgroup;
select workgroup_name, workgroup_arn, workgroup_id, base_capacity, creation_date, region, statusfrom 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, statusfrom aws_redshiftserverless_workgroupwhere status <> 'AVAILABLE';
select workgroup_name, workgroup_arn, workgroup_id, base_capacity, creation_date, region, statusfrom aws_redshiftserverless_workgroupwhere 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, statusfrom aws_redshiftserverless_workgroupwhere publicly_accessible;
select workgroup_name, workgroup_arn, workgroup_id, base_capacity, creation_date, region, statusfrom aws_redshiftserverless_workgroupwhere 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_capacityfrom aws_redshiftserverless_workgroupwhere status = 'AVAILABLE';
select sum(base_capacity) total_base_capacityfrom aws_redshiftserverless_workgroupwhere 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_detailsfrom 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_detailsfrom 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_valuefrom 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_valuefrom aws_redshiftserverless_workgroup, json_each(config_parameters) as p;
Schema for aws_redshiftserverless_workgroup
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. | |
base_capacity | bigint | The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). | |
config_parameters | jsonb | An array of parameters to set for finer control over a database. | |
creation_date | timestamp with time zone | The creation date of the workgroup. | |
cross_account_vpcs | jsonb | A list of VPCs. Each entry is the unique identifier of a virtual private cloud with access to Amazon Redshift Serverless. | |
custom_domain_certificate_arn | text | The custom domain name certificate Amazon resource name (ARN). | |
custom_domain_certificate_expiry_time | timestamp with time zone | The expiration time for the certificate. | |
custom_domain_name | text | The custom domain name associated with the workgroup. | |
endpoint | jsonb | The endpoint that is created from the workgroup. | |
enhanced_vpc_routing | boolean | The value that specifies whether to enable enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC. | |
max_capacity | bigint | The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. | |
namespace_name | text | The namespace the workgroup is associated with. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
patch_version | text | The patch version of your Amazon Redshift Serverless workgroup. | |
publicly_accessible | boolean | A value that specifies whether the workgroup can be accessible from a public network. | |
region | text | The AWS Region in which the resource is located. | |
security_group_ids | jsonb | An array of security group IDs to associate with the workgroup. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | The status of the workgroup. | |
subnet_ids | jsonb | An array of subnet IDs the workgroup is associated with. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | The list of tags for the workgroup. | |
title | text | Title of the resource. | |
workgroup_arn | text | The Amazon Resource Name (ARN) that links to the workgroup. | |
workgroup_id | text | The unique identifier of the workgroup. | |
workgroup_name | text | = | 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