Table: aws_organizations_account - Query AWS Organizations Account using SQL
The AWS Organizations Account is a resource within AWS Organizations service that allows you to centrally manage and govern your environment as you grow and scale your AWS resources. By using AWS Organizations Account, you can create, invite, and manage accounts, set up and apply policies, and consolidate your billing. This helps you to automate AWS account creation and management, and control access to your AWS services.
Table Usage Guide
The aws_organizations_account
table in Steampipe provides you with information about each AWS account that is a member of an organization in AWS Organizations. This table allows you, as a DevOps engineer, to query account-specific details, including account status, joined method, email, and associated metadata. You can utilize this table to gather insights on accounts, such as accounts with specific statuses, the method used by the accounts to join the organization, and more. The schema outlines the various attributes of the AWS account, including the account ID, ARN, email, joined method, and status for you.
Important Notes
- The
account_id
column in this table is the account ID from which the API calls are being made (often the management account). To get the described member account's ID, query theid
column.
Examples
Basic info
Explore the membership details of your AWS organization accounts, including their status and the method they joined with. This can help in understanding account utilization and managing user access.
select id, arn, email, joined_method, joined_timestamp, name, status, tagsfrom aws_organizations_account;
select id, arn, email, joined_method, joined_timestamp, name, status, tagsfrom aws_organizations_account;
List suspended accounts
Discover the segments that are suspended within your organization's account. This is particularly useful for auditing and compliance purposes, allowing you to identify and address any potential issues or risks associated with these accounts.
select id, name, arn, email, joined_method, joined_timestamp, statusfrom aws_organizations_accountwhere status = 'SUSPENDED';
select id, name, arn, email, joined_method, joined_timestamp, statusfrom aws_organizations_accountwhere status = 'SUSPENDED';
Schema for aws_organizations_account
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. | |
arn | text | The Amazon Resource Name (ARN) of the account. | |
text | The email address associated with the AWS account. | ||
id | text | = | The unique identifier (account ID) of the member account. |
joined_method | text | The method by which the account joined the organization. | |
joined_timestamp | timestamp with time zone | The date the account became a part of the organization. | |
name | text | The friendly name of the account. | |
parent_id | text | = | The unique identifier (ID) for the parent root or organization unit (OU) whose accounts you want to list. |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
region | text | The AWS Region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | The status of the account in the organization. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | ||
title | text | Title 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_organizations_account