steampipe plugin install aws

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_name
from
aws_availability_zone;
select
name,
zone_id,
zone_type,
group_name,
region_name
from
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_count
from
aws_availability_zone
group by
region_name;
select
region_name,
count(name) as zone_count
from
aws_availability_zone
group 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_status
from
aws_availability_zone
where
opt_in_status = 'not-opted-in';
select
name,
zone_id,
region_name,
opt_in_status
from
aws_availability_zone
where
opt_in_status = 'not-opted-in';

Schema for aws_availability_zone

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
group_nametextFor 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.
messagestextAny messages about the Availability Zone, Local Zone, or Wavelength Zone.
nametext=The name of the Availability Zone, Local Zone, or Wavelength Zone
opt_in_statustextFor 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_idtextThe ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls
parent_zone_nametextThe name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
region_nametext=The name of the Region.
titletextTitle of the resource.
zone_idtext=The ID of the Availability Zone, Local Zone, or Wavelength Zone.
zone_typetextThe 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