aboutsummaryrefslogtreecommitdiff
path: root/doc/book/connect
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-02 15:13:05 +0300
committerFlorian Klink <flokli@flokli.de>2023-10-02 17:16:11 +0300
commitcb359b4434201b03a3f62b8950d4d6b6f1ab3b36 (patch)
treef71e9f26bff60bce2383aa0a2bf4cd727373c565 /doc/book/connect
parent3a0e07404707568dabb13cecaf79e0466c5fc296 (diff)
downloadgarage-cb359b4434201b03a3f62b8950d4d6b6f1ab3b36.tar.gz
garage-cb359b4434201b03a3f62b8950d4d6b6f1ab3b36.zip
doc: update endpoint_url documentation
Since `awscli` `>=1.29.0` or `>=2.13.0` it is now possible to use the `AWS_ENDPOINT_URL` environment variable, or the `endpoint_url` config key to override the endpoint URL. This means, the aws bash function to wrap with --endpoint-url is not necessary anymore. Update invocations to reflect that. https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html https://github.com/aws/aws-cli/issues/4454#issuecomment-1626116607
Diffstat (limited to 'doc/book/connect')
-rw-r--r--doc/book/connect/apps/index.md4
-rw-r--r--doc/book/connect/cli.md7
2 files changed, 6 insertions, 5 deletions
diff --git a/doc/book/connect/apps/index.md b/doc/book/connect/apps/index.md
index 83aadec2..3f59530a 100644
--- a/doc/book/connect/apps/index.md
+++ b/doc/book/connect/apps/index.md
@@ -421,7 +421,7 @@ Now we can write a simple script (eg `~/.local/bin/matrix-cache-gc`):
## CONFIGURATION ##
AWS_ACCESS_KEY_ID=GKxxx
AWS_SECRET_ACCESS_KEY=xxxx
-S3_ENDPOINT=http://localhost:3900
+AWS_ENDPOINT_URL=http://localhost:3900
S3_BUCKET=matrix
MEDIA_STORE=/var/lib/matrix-synapse/media
PG_USER=matrix
@@ -442,7 +442,7 @@ EOF
s3_media_upload update-db 1d
s3_media_upload --no-progress check-deleted $MEDIA_STORE
-s3_media_upload --no-progress upload $MEDIA_STORE $S3_BUCKET --delete --endpoint-url $S3_ENDPOINT
+s3_media_upload --no-progress upload $MEDIA_STORE $S3_BUCKET --delete --endpoint-url $AWS_ENDPOINT_URL
```
This script will list all the medias that were not accessed in the 24 hours according to your database.
diff --git a/doc/book/connect/cli.md b/doc/book/connect/cli.md
index 591ac151..c9ffd4f4 100644
--- a/doc/book/connect/cli.md
+++ b/doc/book/connect/cli.md
@@ -70,16 +70,17 @@ Then a file named `~/.aws/config` and put:
```toml
[default]
region=garage
+endpoint_url=http://127.0.0.1:3900
```
Now, supposing Garage is listening on `http://127.0.0.1:3900`, you can list your buckets with:
```bash
-aws --endpoint-url http://127.0.0.1:3900 s3 ls
+aws s3 ls
```
-Passing the `--endpoint-url` parameter to each command is annoying but AWS developers do not provide a corresponding configuration entry.
-As a workaround, you can redefine the aws command by editing the file `~/.bashrc`:
+If you're using awscli `<1.29.0` or `<2.13.0`, you need to pass `--endpoint-url` to each CLI invocation explicitly.
+As a workaround, you can redefine the aws command by editing the file `~/.bashrc` in this case:
```
function aws { command aws --endpoint-url http://127.0.0.1:3900 $@ ; }