AWS Classroom Series – 29/Aug/2020

Automating the EBS snapshot lifecycle

  • Lets understand how can i use Amazon Data Lifecycle Manager to automate the creation, retention & deletion of the snapshots of EBS volumes

  • Amazon Data Life cycle Manager uses the resources tags to identify the EBS volumes to be backed up and Amazon Data Life cycle Manager applies the following tags to all snapshots created by policy

    • aws:dlm:lifecycle-policy-id
    • aws:dlm:lifecycle-schedule-name
  • Using Amazon Data Life cycle Manager, we create a life cycle policy which consists of

    • Resource Type: The type of AWS resource managed by policy. If we want to create individual volume snapshots use VOLUME or use INSTANCE to create multi-volume snapshots from the volume attached to ec2 instance.
    • Target tags: The tags that must be associated with EBS volume or EC2 instance.
    • Schedule: The start time & interval for creating snapshots
    • Retention: You can retain snapshots on either total count of snapshots or age of snapshots
  • Lets create a Life cycle policy Preview Preview Preview Preview Preview Preview

  • Once the policy is created, the following actions can be performed Preview

  • Cross Region Copy can also be specified while creating the policy Preview

  • Exercise: Create an Lifecycle policy to have 3 previous snapshots for an ec2 instance (count = 3) (Waiting till 9:32 AM)

Fast snapshot restore

  • Internally the EBS snapshots are stored in S3. So when we try to create a volume from snapshot, data should be copied from s3 (object storage) into disk storage, so it takes decent time.
  • AWS has given an option called as EBS Fast Snapshot Restore which internally engages with more compute & memory to improve the time taken for copy process from S3 to EBS.
  • AWS claims it can recover 1 TB per hour.
  • FSR costs will be based on duration for which this feature is enabled & approximately it costs 0.75$ per hour in addition to EBS Snapshots Costs.

EBS Elastic Volumes

  • With EBS Elastic Volumes, we can increase volume size, change the volume type or adjust the performance of EBS volumes without a need for stopping/detaching volumes from ec2 instances
  • All the current generation instances support elastic volumes.
  • The approach for expanding the disk size for linux & Windows Instances (Without downtime) will be done in next session.

Configure AWS CLI

  • Please configure aws cli with iam credentials and try to execute
aws ec2 describe-volumes
  • Now compare the results with UI Preview
  • Now since we get similar results, lets try to do what ever we have done on console (ui) from cli as well from our next session.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin