CloudWiki
Resource

EBS Snapshots

Amazon Web Services
Storage
EBS snapshots are incremental point-in-time copy of data of EBS volumes, stored in Amazon S3, that contain all the information needed to restore in case of disaster-recovery or for data migration across regions and accounts.
Terraform Name
terraform
aws_ebs_snapshot
EBS Snapshots
attributes:
  • volume_id - (Required) The Volume ID of which to make a snapshot.
  • description - (Optional) A description of what the snapshot is.
  • outpost_arn - (Optional) The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.
  • storage_tier - (Optional) The name of the storage tier. Valid values are archive and standard. Default value is standard.
  • permanent_restore - (Optional) Indicates whether to permanently restore an archived snapshot.
  • temporary_restore_days - (Optional) Specifies the number of days for which to temporarily restore an archived snapshot. Required for temporary restores only. The snapshot will be automatically re-archived after this period.
  • tags - (Optional) A map of tags to assign to the snapshot. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Associating resources with a
EBS Snapshots
Resources do not "belong" to a
EBS Snapshots
Rather, one or more Security Groups are associated to a resource.
Create
EBS Snapshots
via Terraform:
The following HCL creates an EBS snapshot from an EBS volume
Syntax:

resource "aws_ebs_volume" "example" {
 availability_zone = "us-west-2a"
 size              = 40

 tags = {
   Name = "HelloWorld"
 }
}

resource "aws_ebs_snapshot" "example_snapshot" {
 volume_id = aws_ebs_volume.example.id

 tags = {
   Name = "HelloWorld_snap"
 }
}

Create
EBS Snapshots
via CLI:
Parametres:

create-snapshot
[--description <value>]
[--outpost-arn <value>]
--volume-id <value>
[--tag-specifications <value>]
[--dry-run | --no-dry-run]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]

Example:

aws ec2 create-snapshot --volume-id vol-1234567890abcdef0 --description 'Prod backup' --tag-specifications 'ResourceType=snapshot,Tags=[{Key=purpose,Value=prod},{Key=costcenter,Value=123}]'

aws cost
Costs
The cost of using Amazon Elastic Block Store (EBS) snapshots in Amazon Web Services (AWS) depends on the amount of data stored and the amount of data transferred. For storage, you are charged based on the amount of data stored in your EBS snapshots. The cost of storage varies depending on the region you are using. For data transfer, you are charged based on the amount of data transferred in and out of your EBS snapshots. The cost of data transfer varies depending on the region you are using.
Direct Cost

<Region>-EBS:SnapshotUsage

Indirect Cost
No items found.
Best Practices for
EBS Snapshots

Categorized by Availability, Security & Compliance and Cost

Low
Access allowed from VPN
No items found.
Low
Auto Scaling Group not in use
No items found.
Medium
Connections towards DynamoDB should be via VPC endpoints
No items found.
Medium
Container in CrashLoopBackOff state
No items found.
Low
EC2 with GPU capabilities
No items found.
Medium
EC2 with high privileged policies
No items found.
Medium
ECS cluster delete alarm
No items found.
Critical
ECS task with Admin access (*:*)
Medium
ECS task with high privileged policies
No items found.
Critical
EKS cluster delete alarm
No items found.
Medium
ElastiCache cluster delete alarm
No items found.
Medium
Ensure Container liveness probe is configured
No items found.
Medium
Ensure ECS task definition has memory limit
No items found.
Critical
Ensure EMR cluster master nodes are not publicly accessible
No items found.
More from
Amazon Web Services