auto get the status copying snapshot

0

Hi, I am copying more volume snapshot for further check. But when i am copying 100 GB snapshot applying AMS key to KMS keys its taking more than 1.30 minutes for creating new copy of snapshot with KMS keys. Every time i need to check whether its is copied or not and what is the current status . is there any way mechanism to get know status of snapshot.

asked 4 months ago154 views
1 Answer
0

Hi,

Yes, you can be automatically notified via the EventBdrige event named Create snapshot: it fires when a snapshot is complete.

As per documentation at https://docs.aws.amazon.com/ebs/latest/userguide/ebs-cloud-watch-events.html#snapshot-events

Create snapshot (createSnapshot)
The createSnapshot event is sent to your AWS account when an action to create a 
snapshot completes. However it is not saved, logged, or archived. This event can 
have a result of either succeeded or failed.

Event data
The listing below is an example of a JSON object emitted by EBS for a successful 
createSnapshot event. In the detail section, the source field contains the ARN of 
the source volume. The startTime and endTime fields indicate when creation of 
the snapshot started and completed.

{
  "version": "0",
  "id": "01234567-0123-0123-0123-012345678901",
  "detail-type": "EBS Snapshot Notification",
  "source": "aws.ec2",
  "account": "012345678901",
  "time": "yyyy-mm-ddThh:mm:ssZ",
  "region": "us-east-1",
  "resources": [
     "arn:aws:ec2::us-west-2:snapshot/snap-01234567"
  ],
  "detail": {
    "event": "createSnapshot",
    "result": "succeeded",
    "cause": "",
    "request-id": "",
    "snapshot_id": "arn:aws:ec2::us-west-2:snapshot/snap-01234567",
    "source": "arn:aws:ec2::us-west-2:volume/vol-01234567",
    "startTime": "yyyy-mm-ddThh:mm:ssZ",
    "endTime": "yyyy-mm-ddThh:mm:ssZ"  }
}

So, you can a Lambda on this event and from this Lamdba activate a SNS topic (email, chat, etc.) to notify about the completion or further automate a dependent process.

Best,

Didier

profile pictureAWS
EXPERT
answered 4 months ago
AWS
EXPERT
reviewed 4 months ago
profile picture
EXPERT
reviewed 4 months ago
  • Thanks for sharing information, but its for common all sanp shot creation , i need to specific snapshots will create copy how can i get the event bridge will trigger specific snapshot trying to create

  • For that you should set up an EventBridge rule to define the triggering event and create a Lambda function containing the snapshot creation logic, then link the EventBridge rule to the Lambda function. This setup will enable automated snapshot creation based on the specified event triggers.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions