Updated Amazon S3 API (markdown)

Chris Lu 2021-09-06 01:16:58 -07:00
parent 11f95c7aa1
commit cc150e6abe

@ -79,9 +79,38 @@ By default, `weed s3` will automatically remove empty folders, to be consistent
You can use `weed s3 -allowEmptyFolder` to toggle this behavior. You can use `weed s3 -allowEmptyFolder` to toggle this behavior.
# Authentication # Authentication
By default, the access key and secret key to access `weed s3` is not authenticated. To enable credential based access, create a config.json file similar to the example below, and specify it via `weed s3 -config=config.json`. By default, the access key and secret key to access `weed s3` is not authenticated. To enable credential based access, you can choose static or dynamic configuration:
* **Dynamic Configuration**: setup auth with `s3.configure` in `weed shell`
* **Static Configuration**: create a config.json file similar to the example below, and specify it via `weed s3 -config=config.json`
## Configuration Example ## Dynamic Configuration
```
> s3.configure -access_key=any -secret_key=any -buckets=bucket1 -user=me -actions=Read,Write,List,Tagging,Admin -apply
{
"identities": [
{
"name": "me",
"credentials": [
{
"accessKey": "any",
"secretKey": "any"
}
],
"actions": [
"Read:bucket1",
"Write:bucket1",
"List:bucket1",
"Tagging:bucket1",
"Admin:bucket1"
]
}
]
}
```
## Static Configuration
To enable credential based access, create a config.json file similar to the example below, and specify it via `weed s3 -config=config.json`.
You just need to create a user with all "Admin", "Read", "Write", "List", "Tagging" actions. You just need to create a user with all "Admin", "Read", "Write", "List", "Tagging" actions.
You can create as many users as needed. Each user can have multiple credentials. You can create as many users as needed. Each user can have multiple credentials.