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_datefrom aws_backup_plan;
select name, backup_plan_id, arn, creation_date, last_execution_datefrom 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_datefrom aws_backup_planwhere creation_date <= (current_date - interval '90' day)order by creation_date;
select name, backup_plan_id, arn, creation_date, last_execution_datefrom aws_backup_planwhere 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_datefrom aws_backup_planwhere deletion_date > current_date - 7order by deletion_date;
select name, arn, creation_date, deletion_datefrom aws_backup_planwhere deletion_date > date('now', '-7 day')order by deletion_date;
Query examples
Control examples
Schema for aws_backup_plan
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
advanced_backup_settings | jsonb | Contains a list of BackupOptions for a resource type. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
arn | text | An Amazon Resource Name (ARN) that uniquely identifies a backup plan. | |
backup_plan | jsonb | Specifies the body of a backup plan. | |
backup_plan_id | text | = | Specifies the id to identify a backup plan uniquely. |
creation_date | timestamp with time zone | The date and time a resource backup plan is created. | |
creator_request_id | text | An unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. | |
deletion_date | timestamp with time zone | The date and time a backup plan is deleted. | |
last_execution_date | timestamp with time zone | The last time a job to back up resources was run with this rule. | |
name | text | The display name of a saved backup plan. | |
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. | |
title | text | Title of the resource. | |
version_id | text | = | 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