简体   繁体   中英

Possible to get bandwidth used by S3 bucket using boto3?

python中的boto3是否支持查询特定S3存储桶使用了多少带宽(以字节为单位)?

You can activate Amazon S3 Server Access Logging :

To track requests for access to your bucket, you can enable server access logging . Each access log record provides details about a single access request, such as the requester, bucket name, request time, request action, response status, and an error code, if relevant.

The logs are output to Amazon S3 (there is a delay involved). You could then process the logs files using Python. I like using Amazon Athena to run queries on the logs.

See: Analyze Access Logs Using Athena

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM