Object Store operations using AWS client
You can run the following commands for performing OBS operations using AWS Client.
- Creating a bucket aws s3api --endpoint-url http://0.0.0.0:9878 create-bucket --bucket=obs-s3bucket
- Bucket Info ozone sh bucket info /s3v/obs-s3bucket
-
Writing a file to bucket
- aws s3 cp --endpoint-url http://0.0.0.0:9878 ozone.txt s3://obs-s3bucket/dir1/dir2/dir3/##awsfile1
- aws s3 cp --endpoint-url http://0.0.0.0:9878 ozone.txt s3://obs-s3bucket/dir1/dir2/dir3/##awsfile2
-
Reading the above file from bucket
- rm -rf /tmp/sample.txt
- ozone sh key get /s3v/obs-s3bucket/dir1/dir2/dir3/##awsfile1 /tmp/sample.txt
- cat /tmp/sample.txt
- Listing bucket object aws s3api --endpoint-url http://0.0.0.0:9878 list-objects --bucket obs-s3bucket
- Deleting a key aws s3 rm --endpoint-url http://0.0.0.0:9878 s3://obs-s3bucket/dir1/dir2/dir3/awsfile1