aws.ec2.describe_snapshots
Example SQL Queries
SELECT * FROMaws.ec2.describe_snapshots;Description
Describes the specified EBS snapshots available to you or all of the EBS snapshots available to you.
The snapshots available to you include public snapshots, private snapshots that you own, and private snapshots owned by other Amazon Web Services accounts for which you have explicit create volume permissions.
The create volume permissions fall into the following categories:
public: The owner of the snapshot granted create volume permissions for the snapshot to the all group. All Amazon Web Services accounts have create volume permissions for these snapshots.
explicit: The owner of the snapshot granted create volume permissions to a specific Amazon Web Services account.
implicit: An Amazon Web Services account has implicit create volume permissions for all snapshots it owns.
The list of snapshots returned can be filtered by specifying snapshot IDs, snapshot owners, or Amazon Web Services accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.
If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.
If you specify one or more snapshot owners using the OwnerIds option, only snapshots from the specified owners and for which you have access are returned. The results can include the Amazon Web Services account IDs of the specified owners, amazon for snapshots owned by Amazon, or self for snapshots that you own.
If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify Amazon Web Services account IDs (if you own the snapshots), self for snapshots for which you own or have explicit permissions, or all for public snapshots.
If you are describing a long list of snapshots, we recommend that you paginate the output to make the list more manageable. For more information, see Pagination.
To get the state of fast snapshot restores for a snapshot, use DescribeFastSnapshotRestores.
For more information about EBS snapshots, see Amazon EBS snapshots in the Amazon EBS User Guide.
We strongly recommend using only paginated requests. Unpaginated requests are susceptible to throttling and timeouts.
Table Definition
| Column Name | Column Data Type |
|---|---|
| dry_run Input Column Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. | BOOLEAN |
| filters Input Column The filters.
| STRUCT( |
Show child fields
| |
| owner_ids Input Column Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self, and amazon. | VARCHAR[] |
Show child fields
| |
| restorable_by_user_ids Input Column The IDs of the Amazon Web Services accounts that can create volumes from the snapshot. | VARCHAR[] |
Show child fields
| |
| snapshot_ids Input Column The snapshot IDs. Default: Describes the snapshots for which you have create volume permissions. | VARCHAR[] |
Show child fields
| |
| _aws_profile Input Column The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role. | STRUCT( |
Show child fields
| |
| _aws_region Input Column The AWS region to use. | VARCHAR |
| data_encryption_key_id The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by DescribeSnapshots. | VARCHAR |
| description The description for the snapshot. | VARCHAR |
| encrypted Indicates whether the snapshot is encrypted. | BOOLEAN |
| kms_key_id The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume. | VARCHAR |
| outpost_arn The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon EBS User Guide. | VARCHAR |
| owner_alias The Amazon Web Services owner alias, from an Amazon-maintained list (amazon). This is not the user-configured Amazon Web Services account alias set using the IAM console. | VARCHAR |
| owner_id The ID of the Amazon Web Services account that owns the EBS snapshot. | VARCHAR |
| progress The progress of the snapshot, as a percentage. | VARCHAR |
| restore_expiry_time Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived. | TIMESTAMP_S |
| snapshot_id The ID of the snapshot. Each snapshot receives a unique identifier when it is created. | VARCHAR |
| sse_type Reserved for future use. | VARCHAR |
| start_time The time stamp when the snapshot was initiated. | TIMESTAMP_S |
| state The snapshot state. | VARCHAR |
| state_message Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by DescribeSnapshots. | VARCHAR |
| storage_tier The storage tier in which the snapshot is stored. standard indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. archive indicates that the snapshot is currently archived and that it must be restored before it can be used. | VARCHAR |
| tags Any tags assigned to the snapshot. | STRUCT( |
Show child fields
| |
| volume_id The ID of the volume that was used to create the snapshot. Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose. | VARCHAR |
| volume_size The size of the volume, in GiB. | BIGINT |