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) |
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 |

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:If you include
VersionId, versioning must be enabled on the source bucket. Otherwise, the report will fail.Key Configuration Options
Schedule.Frequency:DailyorWeeklyIncludedObjectVersions:AllorCurrentOptionalFields: Add any additional metadata fields you requireDestination.S3BucketDestination.Prefix: Organize reports under a common prefix