Amazon Simple Storage Service (Amazon S3)
AWS S3 Management
Inventory
Amazon S3 Inventory provides scheduled listings of the objects in your S3 bucket, along with key metadata. You can generate these reports daily or weekly in CSV or Apache Parquet format, simplifying auditing, compliance, and analytics workflows.
What Is Amazon S3 Inventory?
An S3 Inventory report gives you a flat-file listing of all objects and their metadata stored in a bucket. It’s ideal for:
- Auditing object-level configurations
- Generating cost and usage analytics
- Verifying compliance requirements
- Bulk operations (e.g., export object keys for processing)
Report Formats and Delivery
You can choose one of two output formats:
Format | Advantages |
---|---|
CSV | Widely supported by spreadsheets and ETL tools |
Apache Parquet | Optimized for big-data queries (e.g., Amazon Athena) |
Reports are delivered to a destination bucket in the same AWS Region, and you can configure optional encryption and prefix settings.
Note
Inventory reports can take up to 48 hours to appear when first enabled. Plan accordingly before running compliance checks.
Metadata Fields Included
By default, each inventory entry includes the following metadata fields:
Field | Description |
---|---|
Bucket name | The name of the source bucket |
Object key | The object’s path and file name |
Version ID | Version identifier (requires versioning) |
Size | Object size in bytes |
Last modified | Timestamp of the last modification |
Storage class | e.g., STANDARD, INTELLIGENT_TIERING |
Replication status | COMPLETE , PENDING , or FAILED |
Encryption status | e.g., AES256 or AWS KMS key |
Object lock status | Holds GOVERNANCE or COMPLIANCE locks |
Refer to the AWS documentation for the full list of available fields.
Configuring S3 Inventory Reports
You can set up an inventory report via the AWS CLI, SDK, or the S3 console. Below is an example using the AWS CLI:
aws s3api put-bucket-inventory-configuration \
--bucket my-source-bucket \
--id daily-inventory \
--inventory-configuration '{
"Destination": {
"S3BucketDestination": {
"AccountId": "123456789012",
"Bucket": "arn:aws:s3:::my-destination-bucket",
"Format": "CSV",
"Prefix": "inventory-reports/"
}
},
"IsEnabled": true,
"Filter": {
"Prefix": "data/"
},
"IncludedObjectVersions": "All",
"OptionalFields": [
"Size",
"LastModifiedDate",
"StorageClass",
"ETag",
"IsMultipartUploaded",
"ReplicationStatus"
],
"Schedule": {
"Frequency": "Daily"
}
}'
Warning
If you include VersionId
, versioning must be enabled on the source bucket. Otherwise, the report will fail.
Key Configuration Options
Schedule.Frequency
:Daily
orWeekly
IncludedObjectVersions
:All
orCurrent
OptionalFields
: Add any additional metadata fields you requireDestination.S3BucketDestination.Prefix
: Organize reports under a common prefix
References
Watch Video
Watch video content