https://github.com/dubniczky/bucket-stats
Storage statistic generation tool for AWS S3 buckets with storage classes
https://github.com/dubniczky/bucket-stats
aws cost-optimization optimization python s3 s3-bucket script
Last synced: 3 months ago
JSON representation
Storage statistic generation tool for AWS S3 buckets with storage classes
- Host: GitHub
- URL: https://github.com/dubniczky/bucket-stats
- Owner: dubniczky
- License: mit
- Created: 2023-07-11T15:07:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-11T15:28:54.000Z (about 3 years ago)
- Last Synced: 2025-03-31T13:33:05.902Z (over 1 year ago)
- Topics: aws, cost-optimization, optimization, python, s3, s3-bucket, script
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Bucket Stats
Storage statistic generation tool for AWS S3 buckets with storage classes
## Usage
### 1. Authenticate to AWS
Log into your AWS account using the AWS CLI. This depends on your use-case so I won't go into detail here.
### 2. Create a list of buckets
With any tool you are comfortable with, create a list of S3 bucket names you'd like to generate statistics for. The list should be a text file with one bucket name per line.
```
bucket1
bucket2
bucket3
```
> Make sure it's just the name, not the URL (`s3://...`) or ARN (`arn:aws:s3:::...`)
### 3. Install dependencies
```bash
make install
```
*or*
```bash
pip install -r requirements.txt
```
### 4. Run the script
```bash
python stats.py temp/bucket.txt temp/stats.csv
```
## Docs
Metrics and Dimensions docs for S3: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metrics-dimensions.html