Skip to content

Commit 13ab52a

Browse files
authored
Clarify S3 usage (#25)
* Clarify S3 usage
1 parent d09b109 commit 13ab52a

File tree

3 files changed

+50
-5
lines changed

3 files changed

+50
-5
lines changed

json-schema/platforms/custom-s3.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
}
1212
},
1313
"then": {
14-
"$comment": "No specific validation rules apply"
14+
"bucket": {
15+
"type": "string"
16+
},
17+
"region": {
18+
"type": "string"
19+
}
1520
}
1621
}

platforms/aws-s3.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This defines the Amazon Web Services (AWS) S3 interface.
44

5-
- `platform`: `https://{bucket}.s3.{region}.amazonaws.com`
6-
- `bucket`: The bucket name
7-
- `region`: One of the S3 regions (lowercase)
5+
- `platform`: `https://{bucket}.s3.{region}.amazonaws.com`,
6+
which is the endpoint URL after replacing all variables in the URL.
7+
- `bucket`: The bucket name.
8+
- `region`: One of the S3 regions (lowercase).
9+
10+
**Note:** If the `s3` authentication scheme (i.e. "Simple S3 authentication") is referred to through `auth:refs`, you should disable signing requests,
11+
e.g. using the AWS CLI parameter `--no-sign-request`.

platforms/custom-s3.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,40 @@
22

33
This defines the S3 interface for providers other than AWS (e.g. minio-based).
44

5-
- `platform`: The API URL, must be the endpoint URL that can be used for the AWS CLI for example.
5+
- `platform`: The API URL (template), must be the endpoint URL that can be used for the AWS CLI for example, e.g. `https://{bucket}.example.com` or `http://example.com:9000`.
6+
- `bucket`: The bucket name, if applicable.
7+
- `region`: The region, if applicable.
8+
9+
## Mapping to S3 tooling
10+
11+
### GDAL (`/vsis3/`)
12+
13+
GDAL documentation: <https://gdal.org/en/latest/user/virtual_file_systems.html#vsis3-aws-s3-files>
14+
15+
- `platform`: Some options for S3 can be inferred from the given URL (template):
16+
- `AWS_HTTPS` can be retrieved by parsing the scheme part of the URL. `https` = `ON`, `http` = `OFF`.
17+
- `AWS_S3_ENDPOINT` is the authority part of the URL after replacing all variables in the URL,
18+
e.g. `us-west.mycloud.com` without `https://` or `s3://` as prefix.
19+
- `AWS_VIRTUAL_HOSTING` must be set to `FALSE` if there's no `{bucket}` placeholder in the URL template, otherwise `TRUE` (default value).
20+
- The `region` property corresponds to the `AWS_REGION` option.
21+
- The `requester_pays` property corresponds to the `AWS_REQUEST_PAYER` option. If `requester_pays` is `true`, set `AWS_REQUEST_PAYER` to `requester`.
22+
- If the `s3` authentication scheme (i.e. "Simple S3 authentication") is referred to through `auth:refs`,
23+
you should set `AWS_NO_SIGN_REQUEST` to `NO`. Otherwise it should be `YES`.
24+
25+
### AWS CLI
26+
27+
AWS CLI documentation: <https://awscli.amazonaws.com/v2/documentation/api/latest/reference/index.html>
28+
29+
- `platform` corresponds to `--endpoint-url` after replacing all variables in the URL.
30+
- `region` corresponds to `--region`.
31+
- If `s3` is **missing** from `auth:refs`, you should use `--no-sign-request`.
32+
33+
### s3cmd
34+
35+
s3cmd documentation: <https://s3tools.org/usage>
36+
37+
- `platform` corresponds to `--host` after replacing all variables in the URL.
38+
- `region` corresponds to `--region`.
39+
- `requester_pays` corresponds to `--requester-pays`.
40+
- If the `s3` authentication scheme (i.e. "Simple S3 authentication") is referred to through `auth:refs`,
41+
you should provide an secret access key and an access key id through environment variables, a profile or the `s3cmd sign` command.

0 commit comments

Comments
 (0)