steampipe plugin install aws

Table: aws_backup_plan - Query AWS Backup Plan using SQL

The AWS Backup Plan is a policy-based solution for defining, scheduling, and automating the backup activities of AWS resources. It enables you to centralize and automate data protection across AWS services, simplifying management and reducing operational costs. With AWS Backup, you can customize where and how you backup your resources, providing flexibility and control over your data protection strategy.

Table Usage Guide

The aws_backup_plan table in Steampipe provides you with information about each backup plan within AWS Backup. This table allows you, as a DevOps engineer, to query backup plan-specific details, including backup options, creation and version details, and associated metadata. You can utilize this table to gather insights on backup plans, such as the backup frequency, backup window, lifecycle of the backup, and more. The schema outlines the various attributes of the backup plan for you, including the backup plan ARN, creation date, version, and associated tags.

Examples

Basic Info

Assess the elements within your AWS backup plans to understand when they were created and when they were last executed. This can help in monitoring and managing your backup strategies effectively.

select
name,
backup_plan_id,
arn,
creation_date,
last_execution_date
from
aws_backup_plan;
select
name,
backup_plan_id,
arn,
creation_date,
last_execution_date
from
aws_backup_plan;

List plans older than 90 days

Determine the areas in which backup plans have been inactive for more than 90 days. This can aid in identifying outdated or potentially unnecessary backup plans, facilitating better resource management.

select
name,
backup_plan_id,
arn,
creation_date,
last_execution_date
from
aws_backup_plan
where
creation_date <= (current_date - interval '90' day)
order by
creation_date;
select
name,
backup_plan_id,
arn,
creation_date,
last_execution_date
from
aws_backup_plan
where
creation_date <= date('now', '-90 day')
order by
creation_date;

List plans that were deleted in the last 7 days

Determine the areas in which backup plans were recently removed within the AWS environment to keep track of changes and maintain security standards.

select
name,
arn,
creation_date,
deletion_date
from
aws_backup_plan
where
deletion_date > current_date - 7
order by
deletion_date;
select
name,
arn,
creation_date,
deletion_date
from
aws_backup_plan
where
deletion_date > date('now', '-7 day')
order by
deletion_date;

Schema for aws_backup_plan

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
advanced_backup_settingsjsonbContains a list of BackupOptions for a resource type.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
arntextAn Amazon Resource Name (ARN) that uniquely identifies a backup plan.
backup_planjsonbSpecifies the body of a backup plan.
backup_plan_idtext=Specifies the id to identify a backup plan uniquely.
creation_datetimestamp with time zoneThe date and time a resource backup plan is created.
creator_request_idtextAn unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.
deletion_datetimestamp with time zoneThe date and time a backup plan is deleted.
last_execution_datetimestamp with time zoneThe last time a job to back up resources was run with this rule.
nametextThe display name of a saved backup plan.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
regiontextThe AWS Region in which the resource is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.
version_idtext=Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.

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_backup_plan