Managing S3 buckets using the mms3 command
Use the mms3 bucket commands to create, delete, update, and list S3 buckets.
Note: S3 bucket can be also be created by an S3 account by using the S3 CreateBucket
API.
Example: Create a bucket for an existing S3 user account.
-
List the secret and access keys for the user account.
# mms3 account list s3user9001
Name New Buckets Path Uid Gid Access Key Secret Key ---------- --------------------- ---- --- -------------------- ---------------------------------------- s3user9001 /gpfs/fs/s3user9001-dir 9001 9000 ei2ISlcY7mvBldlEpa9Z g9LXRBF8bABudHoM0G7YDUBEqLy/XA4tXnXS77vF
- Create a bucket in the directory.
# mms3 bucket create newbucket-9k-mms3 --accountName s3user9001 --filesystemPath /gpfs/fs/s3user9001-dir/newbucket-9k-mms3-dir
A sample output is as follows:
Bucket newbucket-9k-mms3 created successfully.
- List the bucket.
# mms3 bucket list newbucket-9k-mms3
A sample output is as follows:
Name Filesystem Path Bucket Owner ------ --------------- ------------- newbucket-9k-mms3 /gpfs/fs/s3user9001-dir/newbucket-9k-mms3-dir s3user9001
- At the S3 client the S3 account user can list the buckets by using the AWS commands to
view the bucket. w
s3u9k ls 2024-07-03 05:38:20 newbucket-9kuser 2024-07-03 06:26:59 newbucket-9k-mms3
Note: s3u9k is the alias that is created earlier on the application node. - Upload objects to the created bucket.
s3u9k cp /bin/trust s3://newbucket-9k-mms3 upload: ../bin/trust to s3://newbucket-9k-mms3/trust
- List the bucket content by using the AWS CLI command.
Data share across S3 users via bucket policies. S3users can share data across them by using a fine granularity with the help of a having a bucket policy in place. For more information, see https://community.ibm.com/community/user/storage/blogs/ravi-kumar-komanduri/2024/07/26/ibm-storage-scale-ces-s3-datashare-bucket-policy.s3u9k ls s3://newbucket-9k-mms3 2024-07-03 06:35:48 239200 trust