- Newest
- Most votes
- Most comments
Glacier restorations do not generate standard S3 event notifications like GET, PUT, or DELETE. Instead, S3 provides specific event types for Glacier-related operations:
s3:ObjectRestore:Post - This event is triggered when a restore request is initiated for an object in Glacier.
s3:ObjectRestore:Completed - This event is triggered when a restore operation is completed and the object is available for access.
These events are part of the S3 Event Notifications system, but they are specific to Glacier operations.
Here's an example of what the JSON structure for an s3:ObjectRestore:Completed event might look like:
{ "Records": [ { "eventVersion": "2.1", "eventSource": "aws:s3", "awsRegion": "us-west-2", "eventTime": "2023-05-10T15:00:00.000Z", "eventName": "s3:ObjectRestore:Completed", "userIdentity": { "principalId": "EXAMPLE" }, "requestParameters": { "sourceIPAddress": "127.0.0.1" }, "responseElements": { "x-amz-request-id": "EXAMPLE123456789", "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" }, "s3": { "s3SchemaVersion": "1.0", "configurationId": "testConfigRule", "bucket": { "name": "example-bucket", "ownerIdentity": { "principalId": "EXAMPLE" }, "arn": "arn:aws:s3:::example-bucket" }, "object": { "key": "test/key", "size": 1024, "eTag": "0123456789abcdef0123456789abcdef", "sequencer": "0A1B2C3D4E5F678901" } }, "glacierEventData": { "restoreEventData": { "lifecycleRestorationExpiryTime": "2023-05-17T15:00:00.000Z", "lifecycleRestoreStorageClass": "STANDARD" } } } ] }
Key points to note:
The eventName is "s3:ObjectRestore:Completed".
There's a glacierEventData field containing restoration-specific information.
The restoreEventData includes the expiry time of the restored object and the storage class it was restored to.
To use this in your tool:
Set up an S3 event notification for the "s3:ObjectRestore:Completed" event type.
Configure your tool to receive and parse this JSON structure.
Look for the glacierEventData field to confirm it's a Glacier restoration event.
Use the information in s3.object to identify which object was restored.
Remember, the exact structure might vary slightly based on your specific setup and AWS region. Always test with your actual environment to ensure compatibility.
Relevant content
asked 3 years ago
asked 2 years ago

Yes S3 does have event notification for Glacier Restore operations. If you read the documentation which you posted - it's mentioned that glacier restore event follow 2.1 event schema version. The eventName field will have value 's3:ObjectRestore:Completed'