简体   繁体   中英

Get the CLI Config for an AWS S3 Bucket

I want to see the existing configuration for a S3 Bucket, so that I can steal and tweak it for my own purposes, in a variety of cases. However, I am not seeing an option I would expect:

aws s3api describe-bucket --bucket BucketName 

Akin to the EMR describe cluster option that does exist:

aws emr describe-cluster --cluster-id j-1PGB1J30TZHQF

There is no single API call or CLI invocation to return the configuration of an S3 bucket, that I'm aware of.

You'd need to query a number of different things, for example its bucket policy, its CORS configuration, any ACLs, transfer acceleration configuration, tags, and more.

All of these things are available from the awscli, for example:

aws s3api get-bucket-policy --bucket X
aws s3api get-bucket-cors --bucket X
aws s3api get-bucket-location --bucket X
aws s3api get-bucket-versioning --bucket X

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