S3 API
Alluxio supports a RESTful API that is compatible with the basic operations of the Amazon S3 API.
The Alluxio S3 API should be used by applications designed to communicate with an S3-like storage and would benefit from the other features provided by Alluxio, such as data caching, data sharing with file system based applications, and storage system abstraction (e.g., using Ceph instead of S3 as the backing store). For example, a simple application that downloads reports generated by analytic tasks can use the S3 API instead of the more complex file system API.
Limitations and Disclaimers
Alluxio Filesystem Limitations
Only top-level Alluxio directories are treated as buckets by the S3 API.
Hence the root directory of the Alluxio filesystem is not treated as an S3 bucket. Any root-level objects (eg:
alluxio://file) will be inaccessible through the Alluxio S3 API.To treat sub-directories as a bucket, the separator
:must be used in the bucket name (eg:s3://sub:directory:bucket/file).Note that this is purely a convenience feature and hence is not returned by API Actions such as ListBuckets.
Alluxio uses / as a reserved separator. Therefore, any S3 paths with objects or folders named / (eg: s3://example-bucket//) will cause undefined behavior. For additional limitations on object key names please check this page: Alluxio limitations
No Bucket Virtual Hosting
Virtual hosting of buckets is not supported in the Alluxio S3 API. Therefore, S3 clients must utilize path-style requests (i.e: http://s3.amazonaws.com/{bucket}/{object} and NOT http://{bucket}.s3.amazonaws.com/{object}).
S3 Writes Implicitly Overwrite
As described in the AWS S3 docs for PutObject:
Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. Amazon S3 does not provide object locking; if you need this, make sure to build it into your application layer or use versioning instead.
Note that at the moment the Alluxio S3 API does not support object versioning
Alluxio S3 will overwrite the existing key and the temporary directory for multipart upload.
Folders in ListObjects(V2)
All sub-directories in Alluxio will be returned in ListObjects(V2) as 0-byte folders. This behavior is in accordance with if you used the AWS S3 console to create all parent folders for each object.
Tagging & Metadata Limits
User-defined tags on buckets & objects are limited to 10 and obey the S3 tag restrictions.
Set the property key
alluxio.proxy.s3.tagging.restrictions.enabled=falseto disable this behavior.
The maximum size for user-defined metadata in PUT-requests is 2KB by default in accordance with S3 object metadata restrictions.
Set the property key
alluxio.proxy.s3.header.metadata.max.sizeto change this behavior.
Performance Implications
, introducing an additional network hop for Alluxio clients. For optimal performance, it is recommended to run the proxy server and an Alluxio worker on each compute node. It is also recommended to put all the proxy servers behind a load balancer.
Global request headers
AWS4-HMAC-SHA256 Credential={user}/..., SignedHeaders=..., Signature=...
There is currently no support for access & secret keys in the Alluxio S3 API. The only supported authentication scheme is the (/en/operation/Security.md#simple)">SIMPLE authentication type. By default, the user that is used to perform any operations is the user that was used to launch the Alluxio proxy process. Therefore this header is used exclusively to specify an Alluxio ACL username to perform an operation with. In order to remain compatible with other S3 clients, the header is still expected to follow the AWS Signature Version 4 format. When supplying an access key to an S3 client, put the intended Alluxio ACL username. The secret key is unused so you may use any dummy value.
Supported S3 API Actions
The following table describes the support status for current S3 API Actions:
Content-Type,
x-amz-copy-source,
x-amz-metadata-directive,
x-amz-tagging-directive,
x-amz-tagging
N/A
Property Keys
The following table contains the configurable Alluxio property keys which pertain to the Alluxio S3 API.
alluxio.proxy.s3.complete.multipart.upload.keepalive.time.interval
30sec
The complete multipart upload keepalive time.
alluxio.proxy.s3.complete.multipart.upload.pool.size
20
The complete multipart upload thread pool size.
alluxio.proxy.s3.deletetype
ALLUXIO_AND_UFS
Delete type when deleting buckets and objects through S3 API. Valid options are `ALLUXIO_AND_UFS` (delete both in Alluxio and UFS), `ALLUXIO_ONLY` (delete only the buckets or objects in Alluxio namespace).
alluxio.proxy.s3.header.metadata.max.size
2KB
The maximum size to allow for user-defined metadata in S3 PUTrequest headers. Set to 0 to disable size limits.
alluxio.proxy.s3.multipart.temporary.dir.suffix
_s3_multipart_tmp
Suffix for the directory which holds parts during a multipart upload.
alluxio.proxy.s3.multipart.upload.cleaner.pool.size
1
The abort multipart upload cleaner pool size.
alluxio.proxy.s3.multipart.upload.cleaner.retry.count
3
The retry count when aborting a multipart upload fails.
alluxio.proxy.s3.multipart.upload.cleaner.retry.delay
10sec
The retry delay time when aborting a multipart upload fails.
alluxio.proxy.s3.multipart.upload.timeout
10min
The timeout for aborting proxy s3 multipart upload automatically.
alluxio.proxy.s3.writetype
CACHE_THROUGH
Write type when creating buckets and objects through S3 API. Valid options are `MUST_CACHE` (write will only go to Alluxio and must be stored in Alluxio), `CACHE_THROUGH` (try to cache, write to UnderFS synchronously), `ASYNC_THROUGH` (try to cache, write to UnderFS asynchronously), `THROUGH` (no cache, write to UnderFS synchronously).
Example Usage
S3 API Actions
AWS CLI
You can use the [AWS command line interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) to send S3 API requests to the Alluxio S3 API. Note that you will have to provide the `--endpoint` parameter to specify the location of the Alluxio S3 REST API with the server's base URI included (i.e: `--endpoint "http://{alluxio.proxy.web.hostname}:{alluxio.proxy.web.port}/api/v1/s3/"`).
As a pre-requisite for operations which involve the Authorization header you may need to configure AWS credentials. for details on how Alluxio uses this header
REST Clients
You can directly use any HTTP client to send S3 API requests to the Alluxio S3 API. Note that the base URI for the Alluxio S3 API's REST server is `/api/v1/s3/` (i.e: your requests should be directed to `"http://{alluxio.proxy.web.hostname}:{alluxio.proxy.web.port}/api/v1/s3/"`).
At the moment, access key and secret key validation does not exist for the Alluxio S3 API. is used purely to specify the intended user to perform a request. The header follows the AWS Signature Version 4 format.
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects-v2 \ --bucket=testbucket { "Contents": [ { "Key": "multipart_copy.txt_6367cf96-ea4e-4447-b931-c5bc91200375/", "LastModified": "2022-05-03T13:00:13.429000+00:00", "Size": 0 }, { "Key": "multipart_copy.txt_6367cf96-ea4e-4447-b931-c5bc91200375/1", "LastModified": "2022-05-03T13:00:13.584000+00:00", "Size": 27040 }, { "Key": "test.txt", "LastModified": "2022-05-03T11:55:01.925000+00:00", "Size": 27040 } ] }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api abort-multipart-upload --bucket=testbucket --key=multipart_copy.txt --upload-id=6367cf96-ea4e-4447-b931-c5bc91200375
$ % aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects-v2 --bucket=testbucket { "Contents": [ { "Key": "test.txt", "LastModified": "2022-05-03T11:55:01.925000+00:00", "Size": 27040 } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api complete-multipart-upload \ --bucket=testbucket --key=multipart.txt --upload-id=6367cf96-ea4e-4447-b931-c5bc91200375 \ --multipart-upload="Parts=[{PartNumber=1},{PartNumber=2}]" { "Location": "/testbucket/multipart.txt", "Bucket": "testbucket", "Key": "multipart.txt", "ETag": "911df44b7ff57801ca8d74568e4ebfbe" }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api head-object --bucket=testbucket --key=multipart.txt { "LastModified": "2022-05-03T20:01:43+00:00", "ContentLength": 27040, "ETag": "0cc175b9c0f1b6a831c399e269772661", "ContentType": "application/octet-stream", "Metadata": {} }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api copy-object \ --copy-source=testbucket/test.txt --bucket=testbucket --key=test_copy.txt { "CopyObjectResult": { "ETag": "911df44b7ff57801ca8d74568e4ebfbe", "LastModified": "2022-05-03T11:37:16.015000+00:00" } }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects --bucket=testbucket { "Contents": [ { "Key": "test.txt", "LastModified": "2022-05-03T11:35:59.243000+00:00", "Size": 27040 }, { "Key": "test_copy.txt", "LastModified": "2022-05-03T11:37:16.185000+00:00", "Size": 27040 } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api create-bucket \ --bucket=testbucket
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-buckets { "Buckets": [ { "Name": "testbucket", "CreationDate": "2022-05-03T11:32:34.156000+00:00" } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api create-multipart-upload \ --bucket=testbucket --key=multipart.txt { "Bucket": "testbucket", "Key": "multipart.txt", "UploadId": "6367cf96-ea4e-4447-b931-c5bc91200375" } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ -X POST "http://localhost:39999/api/v1/s3/testbucket/multipart.txt?uploads" HTTP/1.1 200 OK Date: Tue, 03 May 2022 23:41:26 GMT Content-Type: application/xml Content-Length: 147 Server: Jetty(9.4.43.v20210629) testbucket multipart.txt 6367cf96-ea4e-4447-b931-c5bc91200375 ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-buckets { "Buckets": [ { "Name": "tempbucket", "CreationDate": "2022-05-03T11:55:58.134000+00:00" }, { "Name": "testbucket", "CreationDate": "2022-05-03T11:32:34.156000+00:00" } ] }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api delete-bucket --bucket=tempbucket
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-buckets { "Buckets": [ { "Name": "testbucket", "CreationDate": "2022-05-03T11:32:34.156000+00:00" } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-bucket-tagging \ --bucket=testbucket { "TagSet": [ { "Key": "key1", "Value": "val1" }, { "Key": "key2", "Value": "val2" } ] }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api delete-bucket-tagging --bucket=testbucket
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-bucket-tagging --bucket=testbucket { "TagSet": [] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects-v2 \ --bucket=testbucket { "Contents": [ { "Key": "temp.txt", "LastModified": "2022-05-03T11:55:01.925000+00:00", "Size": 27040 }, { "Key": "test.txt", "LastModified": "2022-05-03T11:54:19.698000+00:00", "Size": 27040 } ] }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api delete-object --bucket=testbucket --key=temp.txt
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects-v2 --bucket=testbucket { "Contents": [ { "Key": "test.txt", "LastModified": "2022-05-03T11:55:01.925000+00:00", "Size": 27040 } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects-v2 \ --bucket=tempbucket { "Contents": [ { "Key": "foo.txt", "LastModified": "2022-05-03T11:57:00.767000+00:00", "Size": 27040 }, { "Key": "temp.txt", "LastModified": "2022-05-03T11:56:11.245000+00:00", "Size": 27040 }, { "Key": "temp2.txt", "LastModified": "2022-05-03T11:56:31.414000+00:00", "Size": 27040 } ] }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api delete-objects --bucket=tempbucket --delete="Objects=[{Key=temp.txt},{Key=temp2.txt}]"
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects-v2 --bucket=tempbucket { "Contents": [ { "Key": "foo.txt", "LastModified": "2022-05-03T11:57:00.767000+00:00", "Size": 27040 } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-object-tagging \ --bucket=testbucket --key=test.txt { "TagSet": [ { "Key": "key1", "Value": "val1" }, { "Key": "key2", "Value": "val2" } ] }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api delete-object-tagging --bucket=testbucket --key=test.txt
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-object-tagging --bucket=testbucket --key=test.txt { "TagSet": [] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-bucket-tagging \ --bucket=testbucket { "TagSet": [ { "Key": "key1", "Value": "val1" }, { "Key": "key2", "Value": "val2" } ] } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ -X GET "http://localhost:39999/api/v1/s3/testbucket?tagging" HTTP/1.1 200 OK Date: Tue, 03 May 2022 23:31:07 GMT Content-Type: application/xml Content-Length: 124 Server: Jetty(9.4.43.v20210629) key1 val1 key2 val2 ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-object \ --bucket=testbucket --key=test.txt /tmp/test.txt { "LastModified": "2022-05-03T18:55:01+00:00", "ContentLength": 27040, "ETag": "0cc175b9c0f1b6a831c399e269772661", "ContentType": "application/octet-stream", "Metadata": {} }
$ stat /tmp/test.txt File: /tmp/test.txt Size: 27040 Blocks: 56 IO Block: 4096 regular file ...
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-object-tagging \ --bucket=testbucket --key=test.txt { "TagSet": [ { "Key": "key1", "Value": "val1" }, { "Key": "key2", "Value": "val2" } ] } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ -X GET "http://localhost:39999/api/v1/s3/testbucket?tagging" HTTP/1.1 200 OK Date: Tue, 03 May 2022 23:31:07 GMT Content-Type: application/xml Content-Length: 124 Server: Jetty(9.4.43.v20210629) key1 val1 key2 val2 ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api head-object \ --bucket=testbucket --key=test.txt { "LastModified": "2022-05-03T18:55:01+00:00", "ContentLength": 27040, "ETag": "0cc175b9c0f1b6a831c399e269772661", "ContentType": "application/octet-stream", "Metadata": {} } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ --head http://localhost:39999/api/v1/s3/testbucket/test.txt HTTP/1.1 200 OK Date: Tue, 03 May 2022 21:54:22 GMT Last-Modified: Tue, 03 May 2022 21:47:36 GMT ETag: 0cc175b9c0f1b6a831c399e269772661 Content-Type: application/octet-stream Content-Length: 27040 Server: Jetty(9.4.43.v20210629) ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-buckets { "Buckets": [ { "Name": "testbucket", "CreationDate": "2022-05-03T11:32:34.156000+00:00" } ] } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ -X GET http://localhost:39999/api/v1/s3/ HTTP/1.1 200 OK Date: Tue, 03 May 2022 21:35:23 GMT Content-Type: application/xml Content-Length: 161 Server: Jetty(9.4.43.v20210629) testbucket 2022-05-03T14:34:56.420Z ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects \ --bucket=testbucket { "Contents": [ { "Key": "test.txt", "LastModified": "2022-05-03T11:35:59.243000+00:00", "Size": 27040 }, { "Key": "test_copy.txt", "LastModified": "2022-05-03T11:37:16.185000+00:00", "Size": 27040 } ] } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ -X GET http://localhost:39999/api/v1/s3/testbucket HTTP/1.1 200 OK Date: Tue, 03 May 2022 21:50:26 GMT Content-Type: application/xml Content-Length: 434 Server: Jetty(9.4.43.v20210629) false test.txt 27040 2022-05-03T14:47:36.600Z test_copy.txt 27040 2022-05-03T14:50:07.790Z false testbucket 1000 url ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint="http://localhost:39999/api/v1/s3" s3api list-multipart-uploads --bucket "testbucket" { "Uploads": [ { "UploadId": "c4cddf71-914a-4cee-b2af-8cfb7def7d04", "Key": "object", "Initiated": "2022-07-01T11:21:14.738000+00:00" }, { "UploadId": "6367cf96-ea4e-4447-b931-c5bc91200375", "Key": "object", "Initiated": "2022-07-01T11:18:25.290000+00:00" }, { "UploadId": "e111c33b-5c18-4ecd-b543-2849cdbbf22b", "Key": "object2", "Initiated": "2022-07-01T11:21:25.182000+00:00" } ] } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ -X GET "http://localhost:39999/api/v1/s3/testbucket?uploads" HTTP/1.1 200 OK Date: Fri, 01 Jul 2022 18:23:43 GMT Content-Type: application/xml Content-Length: 499 Server: Jetty(9.4.46.v20220331) testbucket object c4cddf71-914a-4cee-b2af-8cfb7def7d04 2022-07-01T11:21:14.738Z object 6367cf96-ea4e-4447-b931-c5bc91200375 2022-07-01T11:18:25.290Z object2 e111c33b-5c18-4ecd-b543-2849cdbbf22b 2022-07-01T11:21:25.182Z ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects-v2 \ --bucket=testbucket { "Contents": [ { "Key": "test.txt", "LastModified": "2022-05-03T11:35:59.243000+00:00", "Size": 27040 }, { "Key": "test_copy.txt", "LastModified": "2022-05-03T11:37:16.185000+00:00", "Size": 27040 } ] } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ -X GET "http://localhost:39999/api/v1/s3/testbucket?list-type=2" HTTP/1.1 200 OK Date: Tue, 03 May 2022 21:56:20 GMT Content-Type: application/xml Content-Length: 438 Server: Jetty(9.4.43.v20210629) true test.txt 27040 2022-05-03T14:47:36.600Z test_copy.txt 27040 2022-05-03T14:50:07.790Z false 2 testbucket 1000 url ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-parts \ --bucket=testbucket --key=multipart.txt --upload-id=6367cf96-ea4e-4447-b931-c5bc91200375 { "Parts": [ { "PartNumber": 1, "LastModified": "2022-05-03T12:56:27.775000+00:00", "ETag": "", "Size": 27040 } ], "ChecksumAlgorithm": null, "Initiator": null, "Owner": null, "StorageClass": "STANDARD" } ```
REST Clients
```console $ curl -i -H "Authorization: AWS4-HMAC-SHA256 Credential=testuser/... SignedHeaders=... Signature=..." \ -X GET "http://localhost:39999/api/v1/s3/testbucket/multipart.txt?uploadId=6367cf96-ea4e-4447-b931-c5bc91200375" HTTP/1.1 200 OK Date: Tue, 03 May 2022 23:49:05 GMT Content-Type: application/octet-stream Content-Length: 314 Server: Jetty(9.4.43.v20210629) /testbucket multipart.txt 6367cf96-ea4e-4447-b931-c5bc91200375 STANDARD false 1 2022-05-03T16:48:56.602Z 27040 ```
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-bucket-tagging \ --bucket=testbucket { "TagSet": [] }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api put-bucket-tagging --bucket=testbucket --tagging='TagSet=[{Key=key1,Value=val1},{Key=key2,Value=val2}]'
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-bucket-tagging --bucket=testbucket { "TagSet": [ { "Key": "key1", "Value": "val1" }, { "Key": "key2", "Value": "val2" } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api put-object \ --bucket=testbucket --key=test.txt --body="${ALLUXIO_HOME}/LICENSE" { "ETag": "911df44b7ff57801ca8d74568e4ebfbe" }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-objects --bucket=testbucket { "Contents": [ { "Key": "test.txt", "LastModified": "2022-05-03T11:35:59.243000+00:00", "Size": 27040 } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-object-tagging \ --bucket=testbucket --key=test.txt { "TagSet": [] }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api put-object-tagging --bucket=testbucket --key=test.txt --tagging='TagSet=[{Key=key1,Value=val1},{Key=key2,Value=val2}]'
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api get-object-tagging --bucket=testbucket --key=test.txt { "TagSet": [ { "Key": "key1", "Value": "val1" }, { "Key": "key2", "Value": "val2" } ] }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api upload-part \ --bucket=testbucket --key=multipart.txt --upload-id=6367cf96-ea4e-4447-b931-c5bc91200375 --part-number=1 --body="${ALLUXIO_HOME}/LICENSE" { "ETag": "911df44b7ff57801ca8d74568e4ebfbe" }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-parts --bucket=testbucket --key=multipart.txt --upload-id=6367cf96-ea4e-4447-b931-c5bc91200375 { "Parts": [ { "PartNumber": 1, "LastModified": "2022-05-03T12:56:27.775000+00:00", "ETag": "", "Size": 27040 } ], "ChecksumAlgorithm": null, "Initiator": null, "Owner": null, "StorageClass": "STANDARD" }
AWS CLI
```console $ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api upload-part-copy \ --bucket=testbucket --key=object --upload-id=6367cf96-ea4e-4447-b931-c5bc91200375 --part-number=1 --copy-source=testbucket/object { "CopyPartResult": { "ETag": "0cc175b9c0f1b6a831c399e269772661" } }
$ aws --profile alluxio-s3 --endpoint "http://localhost:39999/api/v1/s3/" s3api list-parts --bucket=testbucket --key=object --upload-id=6367cf96-ea4e-4447-b931-c5bc91200375 { "Parts": [ { "PartNumber": 1, "LastModified": "2022-07-01T11:27:48.942000+00:00", "ETag": "", "Size": 1 } ], "ChecksumAlgorithm": null, "Initiator": null, "Owner": null, "StorageClass": "STANDARD" }
Python S3 Client
Tested for Python 2.7.
Create a connection:
Please note you have to install boto package first.
Authenticating as a user:
By default, authenticating with no access_key_id uses the user that was used to launch the proxy as the user performing the file system actions.
Set the aws_access_key_id to a different username to perform the actions under a different user.
Create a bucket
List all buckets owned by the user
Authenticating as a user is necessary to have buckets returned by this operation.
PUT a small object
Get the small object
Upload a large object
Create a 8MB file on local file system.
Then use python S3 client to upload this as an object
Get the large object
Delete the objects
Initiate a multipart upload
Upload parts
Complete the multipart upload
Abort the multipart upload
Non-completed uploads can be aborted.
Delete the bucket
Last updated