Amazon Web Services (AWS) - List S3 Bucket Access Control List (ACL) using the AWS CLI
by
Jeremy Canfield |
Updated: April 01 2024
| Amazon Web Services (AWS) articles
This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.
An S3 Bucket is similar to an NFS share in that it is a mountable storage volume (using s3fs fuse). However, one thing that is really cool is that you can interact with an S3 Bucket without having to mount the S3 Bucket on your system. For example, you could use boto to do things like upload and download files in the S3 Bucket.
The aws s3api list-buckets command can be used to list your S3 buckets.
~]$ aws s3api list-buckets
{
"Buckets": [
{
"Name": "my-bucket-abcdefg",
"CreationDate": "2023-06-02T02:22:19+00:00"
}
],
"Owner": {
"DisplayName": "john.doe",
"ID": "ab0e0a41234567893a77c82240d5abcdc41ff11c123456789c777a5123443743"
}
}
Then the aws s3api get-bucket-acl command can be used to list an S3 Bucket Access Control List (ACL). The following permissions can be used:
- FULL_CONTROL
- READ
- READ_ACP
- WRITE
- WRITE_ACP
~]$ aws s3api get-bucket-acl --bucket my-bucket-abcdefg
{
"Owner": {
"DisplayName": "john.des",
"ID": "ab0e0a12345678903a77c82240d5cb3fc41ff11cc312345678977a5f8e743743"
},
"Grants": [
{
"Grantee": {
"DisplayName": "john.doe",
"ID": "ab0e0a12345678903a77c82240d5cb3fc41ff11cc312345678977a5f8e743743",
"Type": "CanonicalUser"
},
"Permission": "FULL_CONTROL"
}
]
}
Did you find this article helpful?
If so, consider buying me a coffee over at