Skip to content

Commit f753215

Browse files
authored
Merge pull request #514 from danlooo/dl/add_write_cloud_doc
Add write cloud buckets to docs
2 parents eb939f0 + 03aac7c commit f753215

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/src/UserGuide/write.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,25 @@ nothing # hide
4040

4141
More on [Zarr Compressors](https://juliaio.github.io/Zarr.jl/latest/reference/#Compressors). Also, if you use this option and don't notice a significant improvement, please feel free to open an issue or start a discussion.
4242

43+
## Write to cloud buckets
44+
45+
Writing directly to S3-compatible cloud object storage is supported.
46+
Valid credentials must be given.
47+
Providing environmental variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` is highly recommended for username and password, respectively.
48+
One needs to create any `AbstractAWSConfig` and activate it with `AWS.global_aws_config`, e. g. using [MinIO](https://expandingman.gitlab.io/Minio.jl/) for self-hosted storage:
49+
50+
```julia
51+
using AWS
52+
using Minio
53+
54+
# assume env vars AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are available
55+
minio_config = MinioConfig("https://s3.example.com:9000")
56+
AWS.global_aws_config(minio_config)
57+
savedataset(ds; path="s3://my_bucket/my_object", driver=:zarr)
58+
```
59+
60+
Note that arguments `path` and `driver` can also be used to create `OutDims` in `mapCube`, enabling writing results of a computation directly to cloud object storage.
61+
4362
## Write NetCDF
4463

4564
Save a single YAXArray to a directory:

0 commit comments

Comments
 (0)