Table: aws_availability_zone - Query EC2 Availability Zones using SQL
The AWS EC2 Availability Zones are isolated locations within data center regions from which public cloud services originate and operate. They are designed to provide stable, secure, and high availability services by allowing users to run instances in several locations. These zones are an essential component for fault-tolerant and highly available infrastructure design, enabling applications to continue functioning despite a failure within a single location.
Table Usage Guide
The aws_availability_zone
table in Steampipe provides you with information about Availability Zones within AWS Elastic Compute Cloud (EC2). This table allows you, as a DevOps engineer, to query zone-specific details, including zone ID, name, region, and state. You can utilize this table to gather insights on zones, such as zones that are currently available, the regions associated with each zone, and more. The schema outlines the various attributes of the Availability Zone for you, including the zone ID, zone name, region name, and zone state.
Examples
Availability zone info
Analyze the settings to understand the distribution and types of availability zones in different regions. This can aid in planning resource deployment for optimal performance and redundancy.
select name, zone_id, zone_type, group_name, region_namefrom aws_availability_zone;
select name, zone_id, zone_type, group_name, region_namefrom aws_availability_zone;
Count of availability zone per region
Determine the distribution of availability zones across different regions to understand the geographical spread of your AWS resources.
select region_name, count(name) as zone_countfrom aws_availability_zonegroup by region_name;
select region_name, count(name) as zone_countfrom aws_availability_zonegroup by region_name;
List of AWS availability zones which are not enabled in the account
Identify the AWS availability zones that are not currently enabled within your account. This is useful for understanding which zones you may want to opt into for increased redundancy or global coverage.
select name, zone_id, region_name, opt_in_statusfrom aws_availability_zonewhere opt_in_status = 'not-opted-in';
select name, zone_id, region_name, opt_in_statusfrom aws_availability_zonewhere opt_in_status = 'not-opted-in';
Schema for aws_availability_zone
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
group_name | text | For Availability Zones, this parameter has the same value as the Region name. For Local Zones, the name of the associated group, for example us-west-2-lax-1. For Wavelength Zones, the name of the associated group, for example us-east-1-wl1-bos-wlz-1. | |
messages | text | Any messages about the Availability Zone, Local Zone, or Wavelength Zone. | |
name | text | = | The name of the Availability Zone, Local Zone, or Wavelength Zone |
opt_in_status | text | For Availability Zones, this parameter always has the value of opt-in-not-required. For Local Zones and Wavelength Zones, this parameter is the opt-in status. The possible values are opted-in, and not-opted-in. | |
parent_zone_id | text | The ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls | |
parent_zone_name | text | The name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls. | |
region_name | text | = | The name of the Region. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. | |
zone_id | text | = | The ID of the Availability Zone, Local Zone, or Wavelength Zone. |
zone_type | text | The type of zone. The valid values are availability-zone, local-zone, and wavelength-zone. |
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_availability_zone