Menu
Amazon Glacier
Developer Guide (API Version 2012-06-01)

Logging Amazon Glacier API Calls by Using AWS CloudTrail

Amazon Glacier is integrated with CloudTrail, a service that captures API calls made by or on behalf of Amazon Glacier in your AWS account and delivers the log files to an Amazon S3 bucket that you specify. CloudTrail captures API calls from the Amazon Glacier console or from the Amazon Glacier API. Using the information collected by CloudTrail, you can determine what request was made to Amazon Glacier, the source IP address from which the request was made, who made the request, when it was made, and so on. To learn more about CloudTrail, including how to configure and enable it, see the AWS CloudTrail User Guide.

Amazon Glacier Information in CloudTrail

When CloudTrail logging is enabled in your AWS account, API calls made to Amazon Glacier actions are tracked in log files. Amazon Glacier records are written together with other AWS service records in a log file. CloudTrail determines when to create and write to a new file based on a time period and file size.

All of the Amazon Glacier actions are logged and are documented in the API Reference for Amazon Glacier. For example, calls to the CreateVault, ListVaults, DescribeVault, and DeleteVault actions generate entries in the CloudTrail log files.

Every log entry contains information about who generated the request. The user identity information in the log helps you determine whether the request was made with root or IAM user credentials, with temporary security credentials for a role or federated user, or by another AWS service. For more information, see the userIdentity field in the CloudTrail Event Reference.

You can store your log files in your bucket for as long as you want, but you can also define Amazon S3 lifecycle rules to archive or delete log files automatically. By default, your log files are encrypted by using Amazon S3 server-side encryption (SSE).

You can choose to have CloudTrail publish Amazon SNS notifications when new log files are delivered if you want to take quick action upon log file delivery. For more information, see Configuring Amazon SNS Notifications.

You can also aggregate Amazon Glacier log files from multiple AWS regions and multiple AWS accounts into a single Amazon S3 bucket. For more information, see Aggregating CloudTrail Log Files to a Single Amazon S3 Bucket.

Understanding Amazon Glacier Log File Entries

CloudTrail log files can contain one or more log entries where each entry is made up of multiple JSON-formatted events. A log entry represents a single request from any source and includes information about the requested action, any parameters, the date and time of the action, and so on. The log entries are not guaranteed to be in any particular order. That is, they are not an ordered stack trace of the public API calls.

The following example shows a CloudTrail log entry that demonstrates the logging of Amazon Glacier actions.

Copy
{ "Records": [ { "awsRegion": "us-east-1", "eventID": "52f8c821-002e-4549-857f-8193a15246fa", "eventName": "CreateVault", "eventSource": "glacier.amazonaws.com", "eventTime": "2014-12-10T19:05:15Z", "eventType": "AwsApiCall", "eventVersion": "1.02", "recipientAccountId": "999999999999", "requestID": "HJiLgvfXCY88QJAC6rRoexS9ThvI21Q1Nqukfly02hcUPPo", "requestParameters": { "accountId": "-", "vaultName": "myVaultName" }, "responseElements": { "location": "/999999999999/vaults/myVaultName" }, "sourceIPAddress": "127.0.0.1", "userAgent": "aws-sdk-java/1.9.6 Mac_OS_X/10.9.5 Java_HotSpot(TM)_64-Bit_Server_VM/25.25-b02/1.8.0_25", "userIdentity": { "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "accountId": "999999999999", "arn": "arn:aws:iam::999999999999:user/myUserName", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "type": "IAMUser", "userName": "myUserName" } }, { "awsRegion": "us-east-1", "eventID": "cdd33060-4758-416a-b7b9-dafd3afcec90", "eventName": "DeleteVault", "eventSource": "glacier.amazonaws.com", "eventTime": "2014-12-10T19:05:15Z", "eventType": "AwsApiCall", "eventVersion": "1.02", "recipientAccountId": "999999999999", "requestID": "GGdw-VfhVfLCFwAM6iVUvMQ6-fMwSqSO9FmRd0eRSa_Fc7c", "requestParameters": { "accountId": "-", "vaultName": "myVaultName" }, "responseElements": null, "sourceIPAddress": "127.0.0.1", "userAgent": "aws-sdk-java/1.9.6 Mac_OS_X/10.9.5 Java_HotSpot(TM)_64-Bit_Server_VM/25.25-b02/1.8.0_25", "userIdentity": { "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "accountId": "999999999999", "arn": "arn:aws:iam::999999999999:user/myUserName", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "type": "IAMUser", "userName": "myUserName" } }, { "awsRegion": "us-east-1", "eventID": "355750b4-e8b0-46be-9676-e786b1442470", "eventName": "ListVaults", "eventSource": "glacier.amazonaws.com", "eventTime": "2014-12-10T19:05:15Z", "eventType": "AwsApiCall", "eventVersion": "1.02", "recipientAccountId": "999999999999", "requestID": "yPTs22ghTsWprFivb-2u30FAaDALIZP17t4jM_xL9QJQyVA", "requestParameters": { "accountId": "-" }, "responseElements": null, "sourceIPAddress": "127.0.0.1", "userAgent": "aws-sdk-java/1.9.6 Mac_OS_X/10.9.5 Java_HotSpot(TM)_64-Bit_Server_VM/25.25-b02/1.8.0_25", "userIdentity": { "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "accountId": "999999999999", "arn": "arn:aws:iam::999999999999:user/myUserName", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "type": "IAMUser", "userName": "myUserName" } }, { "awsRegion": "us-east-1", "eventID": "569e830e-b075-4444-a826-aa8b0acad6c7", "eventName": "DescribeVault", "eventSource": "glacier.amazonaws.com", "eventTime": "2014-12-10T19:05:15Z", "eventType": "AwsApiCall", "eventVersion": "1.02", "recipientAccountId": "999999999999", "requestID": "QRt1ZdFLGn0TCm784HmKafBmcB2lVaV81UU3fsOR3PtoIiM", "requestParameters": { "accountId": "-", "vaultName": "myVaultName" }, "responseElements": null, "sourceIPAddress": "127.0.0.1", "userAgent": "aws-sdk-java/1.9.6 Mac_OS_X/10.9.5 Java_HotSpot(TM)_64-Bit_Server_VM/25.25-b02/1.8.0_25", "userIdentity": { "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "accountId": "999999999999", "arn": "arn:aws:iam::999999999999:user/myUserName", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "type": "IAMUser", "userName": "myUserName" } } ] }