Skip to main content

db_snapshots

Creates, updates, deletes, gets or lists a db_snapshots resource.

Overview

Namedb_snapshots
TypeResource
Idaws.rds.db_snapshots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
additional_storage_volumesstringThe additional storage volumes associated with the DB snapshot. RDS supports additional storage volumes for RDS for Oracle and RDS for SQL Server.
allocated_storageintegerSpecifies the allocated storage size in gibibytes (GiB).
availability_zonestringSpecifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot.
backup_retention_periodintegerThe number of days for which automatic DB snapshots are retained.
db_instance_identifierstringSpecifies the DB instance identifier of the DB instance this DB snapshot was created from.
db_snapshot_arnstringThe Amazon Resource Name (ARN) for the DB snapshot.
db_snapshot_identifierstringSpecifies the identifier for the DB snapshot.
db_system_idstringThe Oracle system identifier (SID), which is the name of the Oracle database instance that manages your database files. The Oracle SID is also the name of your CDB.
dbi_resource_idstringThe identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region.
dedicated_log_volumebooleanIndicates whether the DB instance has a dedicated log volume (DLV) enabled.
encryptedbooleanIndicates whether the DB snapshot is encrypted.
enginestringSpecifies the name of the database engine.
engine_versionstringSpecifies the version of the database engine.
iam_database_authentication_enabledbooleanIndicates whether mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled.
instance_create_timestringSpecifies the time in Coordinated Universal Time (UTC) when the DB instance, from which the snapshot was taken, was created.
iopsintegerSpecifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot.
kms_key_idstringIf Encrypted is true, the Amazon Web Services KMS key identifier for the encrypted DB snapshot. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
license_modelstringLicense model information for the restored DB instance.
master_usernamestringProvides the master username for the DB snapshot.
multi_tenantbooleanIndicates whether the snapshot is of a DB instance using the multi-tenant configuration (TRUE) or the single-tenant configuration (FALSE).
option_group_namestringProvides the option group name for the DB snapshot.
original_snapshot_create_timestringSpecifies the time of the CreateDBSnapshot operation in Coordinated Universal Time (UTC). Doesn't change when the snapshot is copied.
percent_progressintegerThe percentage of the estimated data that has been transferred.
portintegerSpecifies the port that the database engine was listening on at the time of the snapshot.
preferred_backup_windowstringThe daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod.
processor_featuresstringThe number of CPU cores and the number of threads per core for the DB instance class of the DB instance when the DB snapshot was created.
snapshot_availability_zonestringSpecifies the name of the Availability Zone where RDS stores the DB snapshot. This value is valid only for snapshots that RDS stores on a Dedicated Local Zone.
snapshot_create_timestringSpecifies when the snapshot was taken in Coordinated Universal Time (UTC). Changes for the copy when the snapshot is copied.
snapshot_database_timestringThe timestamp of the most recent transaction applied to the database that you're backing up. Thus, if you restore a snapshot, SnapshotDatabaseTime is the most recent transaction in the restored DB instance. In contrast, originalSnapshotCreateTime specifies the system time that the snapshot completed. If you back up a read replica, you can determine the replica lag by comparing SnapshotDatabaseTime with originalSnapshotCreateTime. For example, if originalSnapshotCreateTime is two hours later than SnapshotDatabaseTime, then the replica lag is two hours.
snapshot_targetstringSpecifies where manual snapshots are stored: Dedicated Local Zones, Amazon Web Services Outposts or the Amazon Web Services Region.
snapshot_typestringProvides the type of the DB snapshot.
source_db_snapshot_identifierstringThe DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied from. It only has a value in the case of a cross-account or cross-Region copy.
source_regionstringThe Amazon Web Services Region that the DB snapshot was created in or copied from.
statusstringSpecifies the status of this DB snapshot.
storage_encryption_typestringThe type of encryption used to protect data at rest in the DB snapshot. Possible values: none - The DB snapshot is not encrypted. sse-rds - The DB snapshot is encrypted using an Amazon Web Services owned KMS key. sse-kms - The DB snapshot is encrypted using a customer managed KMS key or Amazon Web Services managed KMS key.
storage_throughputintegerSpecifies the storage throughput for the DB snapshot.
storage_typestringSpecifies the storage type associated with DB snapshot.
tag_liststringA list of tags. For more information, see Tagging Amazon RDS resources in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.
tde_credential_arnstringThe ARN from the key store with which to associate the instance for TDE encryption.
timezonestringThe time zone of the DB snapshot. In most cases, the Timezone element is empty. Timezone content appears only for snapshots taken from Microsoft SQL Server DB instances that were created with a time zone specified.
vpc_idstringProvides the VPC ID associated with the DB snapshot.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_db_snapshotsselectregionDBInstanceIdentifier, DBSnapshotIdentifier, SnapshotType, Filters, MaxRecords, Marker, IncludeShared, IncludePublic, DbiResourceIdReturns information about DB snapshots. This API action supports pagination.
create_db_snapshotinsertDBSnapshotIdentifier, DBInstanceIdentifier, regionTagsCreates a snapshot of a DB instance. The source DB instance must be in the available or storage-optimization state.
modify_db_snapshotupdateDBSnapshotIdentifier, regionEngineVersion, OptionGroupNameUpdates a manual DB snapshot with a new engine version. The snapshot can be encrypted or unencrypted, but not shared or public. Amazon RDS supports upgrading DB snapshots for MariaDB, MySQL, PostgreSQL, and Oracle. This operation doesn't apply to RDS Custom or RDS for Db2.
delete_db_snapshotdeleteDBSnapshotIdentifier, regionDeletes a DB snapshot. If the snapshot is being copied, the copy operation is terminated. The DB snapshot must be in the available state to be deleted.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
DBInstanceIdentifierstringThe identifier of the DB instance that you want to create the snapshot of. Constraints: Must match the identifier of an existing DBInstance.
DBSnapshotIdentifierstringThe DB snapshot identifier. Constraints: Must be the name of an existing DB snapshot in the available state.
regionstringAWS region (default: us-east-1)
DBInstanceIdentifierstringThe ID of the DB instance to retrieve the list of DB snapshots for. This parameter isn't case-sensitive. Constraints: If supplied, must match the identifier of an existing DBInstance.
DBSnapshotIdentifierstringA specific DB snapshot identifier to describe. This value is stored as a lowercase string. Constraints: If supplied, must match the identifier of an existing DBSnapshot. If this identifier is for an automated snapshot, the SnapshotType parameter must also be specified.
DbiResourceIdstringA specific DB resource ID to describe.
EngineVersionstringThe engine version to upgrade the DB snapshot to. The following are the database engines and engine versions that are available when you upgrade a DB snapshot. MariaDB For the list of engine versions that are available for upgrading a DB snapshot, see Upgrading a MariaDB DB snapshot engine version in the Amazon RDS User Guide. MySQL For the list of engine versions that are available for upgrading a DB snapshot, see Upgrading a MySQL DB snapshot engine version in the Amazon RDS User Guide. Oracle 21.0.0.0.ru-2025-04.rur-2025-04.r1 (supported for 21.0.0.0.ru-2022-01.rur-2022-01.r1, 21.0.0.0.ru-2022-04.rur-2022-04.r1, 21.0.0.0.ru-2022-07.rur-2022-07.r1, 21.0.0.0.ru-2022-10.rur-2022-10.r1, 21.0.0.0.ru-2023-01.rur-2023-01.r1 and 21.0.0.0.ru-2023-01.rur-2023-01.r2 DB snapshots) 19.0.0.0.ru-2025-04.rur-2025-04.r1 (supported for 19.0.0.0.ru-2019-07.rur-2019-07.r1, 19.0.0.0.ru-2019-10.rur-2019-10.r1 and 0.0.0.ru-2020-01.rur-2020-01.r1 DB snapshots) 19.0.0.0.ru-2022-01.rur-2022-01.r1 (supported for 12.2.0.1 DB snapshots) 19.0.0.0.ru-2022-07.rur-2022-07.r1 (supported for 12.1.0.2 DB snapshots) 12.1.0.2.v8 (supported for 12.1.0.1 DB snapshots) 11.2.0.4.v12 (supported for 11.2.0.2 DB snapshots) 11.2.0.4.v11 (supported for 11.2.0.3 DB snapshots) PostgreSQL For the list of engine versions that are available for upgrading a DB snapshot, see Upgrading a PostgreSQL DB snapshot engine version in the Amazon RDS User Guide.
FiltersarrayA filter that specifies one or more DB snapshots to describe. Supported filters: db-instance-id - Accepts DB instance identifiers and DB instance Amazon Resource Names (ARNs). db-snapshot-id - Accepts DB snapshot identifiers. dbi-resource-id - Accepts identifiers of source DB instances. snapshot-type - Accepts types of DB snapshots. engine - Accepts names of database engines.
IncludePublicbooleanSpecifies whether to include manual DB cluster snapshots that are public and can be copied or restored by any Amazon Web Services account. By default, the public snapshots are not included. You can share a manual DB snapshot as public by using the ModifyDBSnapshotAttribute API. This setting doesn't apply to RDS Custom.
IncludeSharedbooleanSpecifies whether to include shared manual DB cluster snapshots from other Amazon Web Services accounts that this Amazon Web Services account has been given permission to copy or restore. By default, these snapshots are not included. You can give an Amazon Web Services account permission to restore a manual DB snapshot from another Amazon Web Services account by using the ModifyDBSnapshotAttribute API action. This setting doesn't apply to RDS Custom.
MarkerstringAn optional pagination token provided by a previous DescribeDBSnapshots request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
MaxRecordsintegerThe maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results. Default: 100 Constraints: Minimum 20, maximum 100.
OptionGroupNamestringThe option group to identify with the upgraded DB snapshot. You can specify this parameter when you upgrade an Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see Option group considerations in the Amazon RDS User Guide.
SnapshotTypestringThe type of snapshots to be returned. You can specify one of the following values: automated - Return all DB snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account. manual - Return all DB snapshots that have been taken by my Amazon Web Services account. shared - Return all manual DB snapshots that have been shared to my Amazon Web Services account. public - Return all DB snapshots that have been marked as public. awsbackup - Return the DB snapshots managed by the Amazon Web Services Backup service. For information about Amazon Web Services Backup, see the Amazon Web Services Backup Developer Guide. The awsbackup type does not apply to Aurora. If you don't specify a SnapshotType value, then both automated and manual snapshots are returned. Shared and public DB snapshots are not included in the returned results by default. You can include shared snapshots with these results by enabling the IncludeShared parameter. You can include public snapshots with these results by enabling the IncludePublic parameter. The IncludeShared and IncludePublic parameters don't apply for SnapshotType values of manual or automated. The IncludePublic parameter doesn't apply when SnapshotType is set to shared. The IncludeShared parameter doesn't apply when SnapshotType is set to public.
Tagsarray

SELECT examples

Returns information about DB snapshots. This API action supports pagination.

SELECT
additional_storage_volumes,
allocated_storage,
availability_zone,
backup_retention_period,
db_instance_identifier,
db_snapshot_arn,
db_snapshot_identifier,
db_system_id,
dbi_resource_id,
dedicated_log_volume,
encrypted,
engine,
engine_version,
iam_database_authentication_enabled,
instance_create_time,
iops,
kms_key_id,
license_model,
master_username,
multi_tenant,
option_group_name,
original_snapshot_create_time,
percent_progress,
port,
preferred_backup_window,
processor_features,
snapshot_availability_zone,
snapshot_create_time,
snapshot_database_time,
snapshot_target,
snapshot_type,
source_db_snapshot_identifier,
source_region,
status,
storage_encryption_type,
storage_throughput,
storage_type,
tag_list,
tde_credential_arn,
timezone,
vpc_id
FROM aws.rds.db_snapshots
WHERE region = '{{ region }}' -- required
AND DBInstanceIdentifier = '{{ DBInstanceIdentifier }}'
AND DBSnapshotIdentifier = '{{ DBSnapshotIdentifier }}'
AND SnapshotType = '{{ SnapshotType }}'
AND Filters = '{{ Filters }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
AND IncludeShared = '{{ IncludeShared }}'
AND IncludePublic = '{{ IncludePublic }}'
AND DbiResourceId = '{{ DbiResourceId }}'
;

INSERT examples

Creates a snapshot of a DB instance. The source DB instance must be in the available or storage-optimization state.

INSERT INTO aws.rds.db_snapshots (
DBSnapshotIdentifier,
DBInstanceIdentifier,
region,
Tags
)
SELECT
'{{ DBSnapshotIdentifier }}',
'{{ DBInstanceIdentifier }}',
'{{ region }}',
'{{ Tags }}'
RETURNING
additional_storage_volumes,
allocated_storage,
availability_zone,
backup_retention_period,
db_instance_identifier,
db_snapshot_arn,
db_snapshot_identifier,
db_system_id,
dbi_resource_id,
dedicated_log_volume,
encrypted,
engine,
engine_version,
iam_database_authentication_enabled,
instance_create_time,
iops,
kms_key_id,
license_model,
master_username,
multi_tenant,
option_group_name,
original_snapshot_create_time,
percent_progress,
port,
preferred_backup_window,
processor_features,
snapshot_availability_zone,
snapshot_create_time,
snapshot_database_time,
snapshot_target,
snapshot_type,
source_db_snapshot_identifier,
source_region,
status,
storage_encryption_type,
storage_throughput,
storage_type,
tag_list,
tde_credential_arn,
timezone,
vpc_id
;

UPDATE examples

Updates a manual DB snapshot with a new engine version. The snapshot can be encrypted or unencrypted, but not shared or public. Amazon RDS supports upgrading DB snapshots for MariaDB, MySQL, PostgreSQL, and Oracle. This operation doesn't apply to RDS Custom or RDS for Db2.

UPDATE aws.rds.db_snapshots
SET
-- No updatable properties
WHERE
DBSnapshotIdentifier = '{{ DBSnapshotIdentifier }}' --required
AND region = '{{ region }}' --required
AND EngineVersion = '{{ EngineVersion}}'
AND OptionGroupName = '{{ OptionGroupName}}'
RETURNING
additional_storage_volumes,
allocated_storage,
availability_zone,
backup_retention_period,
db_instance_identifier,
db_snapshot_arn,
db_snapshot_identifier,
db_system_id,
dbi_resource_id,
dedicated_log_volume,
encrypted,
engine,
engine_version,
iam_database_authentication_enabled,
instance_create_time,
iops,
kms_key_id,
license_model,
master_username,
multi_tenant,
option_group_name,
original_snapshot_create_time,
percent_progress,
port,
preferred_backup_window,
processor_features,
snapshot_availability_zone,
snapshot_create_time,
snapshot_database_time,
snapshot_target,
snapshot_type,
source_db_snapshot_identifier,
source_region,
status,
storage_encryption_type,
storage_throughput,
storage_type,
tag_list,
tde_credential_arn,
timezone,
vpc_id;

DELETE examples

Deletes a DB snapshot. If the snapshot is being copied, the copy operation is terminated. The DB snapshot must be in the available state to be deleted.

DELETE FROM aws.rds.db_snapshots
WHERE DBSnapshotIdentifier = '{{ DBSnapshotIdentifier }}' --required
AND region = '{{ region }}' --required
;