...
If you're connecting to buckets hosted at the ECMWF side of the European Weather Cloud, the endpoints are:
- CCI1 cluster : https://object-store.os-api.cci1.ecmwf.int
- CCI2 cluster : https://object-store.os-api.cci2.ecmwf.int
Code Block | ||
---|---|---|
| ||
import os import io import boto3 # Initializing variables for the client S3_BUCKET_NAME = "MyFancyBucket123" #Fill this in S3_ACCESS_KEY = "123asdf" #Fill this in S3_SECRET_ACCESS_KEY = "123asdf111" #Fill this in S3_ENDPOINT_URL = "https://my-s3-endpoint.com" #Fill this in |
...
- upload a file into the new bucket (case 3)
- list the contents of the bucket to verify your file is there (case 1)
- download the file you uploaded (case 2)
Related examples
- Streaming large file in Python from s3 bucket.
Other Resources
- Check a more detailed view into boto3's functionality (although it does emphasize on Amazon Web Services specifically, you can take a look at the Python code involved): https://dashbird.io/blog/boto3-aws-python/
- Check out a full code example at the official boto3 website: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-examples.html
- Check a differently styled tutorial at https://towardsdatascience.com/introduction-to-pythons-boto3-c5ac2a86bb63
...