Get Started
Step 1: Create bucket
Create an object storage bucket, defining a name as well as the desired location.
Upon creation, store the access key safely as you will need it to interact with the bucket.
Bucket name must be globally unique and DNS-compliant.
Step 2: Configure access key
To configure your Access Key ID and Secret Access Key, follow these steps:
-
Access your terminal (Linux/macOS)
-
Install the AWS CLI and run the following command:
aws configure
Replace the placeholders with the actual values provided on the Ori platform (leaving Region empty):
<bucket_key_ID>: Your Access Key ID
<bucket_key>: Your Secret Access Key
Step 3: List bucket objects
To check that everything has been setup correctly, you can run a list command on the bucket.
aws s3 ls --endpoint-url=bucket_endpoint_url s3://bucket_name --recursive
Replace the placeholders with the actual values provided on the Ori platform:
<bucket_endpoint_url>: The endpoint URL for your bucket's location
<bucket_name>: The name of your bucket
Step 4: Copy objects to bucket
aws s3 cp /path/to/file/filename --endpoint-url=https://s3.<bucket_region>.oriobjects.cloud/<bucket_name> s3://bucket_name
Step 5: Delete objects
To delete a single object
aws s3 rm --endpoint-url=https://s3.<bucket_region>.oriobjects.cloud s3://<bucket_name>/filename
To delete every object
aws s3 rm --endpoint-url=https://s3.<bucket_region>.oriobjects.cloud s3://<bucket_name>/ --recursive
If versioning is enabled, you may also want to delete the object versions as well as delete markers.
# object versions
aws s3api delete-objects --endpoint-url=https://s3.<bucket_region>.oriobjects.cloud --bucket <bucket_name> --delete "$(aws s3api list-object-versions --bucket <bucket_name> --endpoint-url=https://s3.<bucket_region>.oriobjects.cloud --query='{Objects: Versions[].{Key:Key,VersionId:VersionId}}')"
# delete markers
aws s3api delete-objects --endpoint-url=https://s3.<bucket_region>.oriobjects.cloud --bucket <bucket_name> --delete "$(aws s3api list-object-versions --bucket <bucket_name> --endpoint-url=https://s3.<bucket_region>.oriobjects.cloud --query='{Objects: DeleteMarkers[].{Key:Key,VersionId:VersionId}}')"