Sử dụng công cụ AWS CLI
Một số use case thông thường
1. Tạo bucket mới
aws s3api create-bucket \
--bucket demoawscli-bucket \
--profile hcm04-prod \
--endpoint-url https://hcm04.vstorage.vngcloud.vn2. Tải lên tệp tin
aws s3 cp ./local-file.txt s3://demoawscli-bucket/file.txt \
--profile hcm04-prod \
--endpoint-url https://hcm04.vstorage.vngcloud.vnaws s3api put-object \
--bucket demoawscli-bucket \
--key test-folder/style.css \
--body ./demo-file.gz \
--content-type "text/css; charset=utf-8" \
--cache-control "max-age=31536000, no-transform, public" \
--content-encoding "gzip" \
--acl public-read \
--profile hcm04-prod \
--endpoint-url https://hcm04.vstorage.vngcloud.vn3. Tải xuống object
4. Liệt kê object trong bucket
5. Xoá object
Một số use case nâng cao
Upload thư mục từ local tới object storage:
Đồng bộ thư mục từ local tới object storage:
Lấy thông tin metadata của object
Tạo URL truy cập tạm thời (presigned URL)
Bật versioning cho bucket
Gán bucket policy
Last updated

