Access object storage
Zerops Object storage is powered by MinIO, a high-performance, S3 compatible object store. Object storage services are operated on an independent infrastructure separated from your other project services. You can access the object storage from any service hosted in Zerops or remotely over the internet.
Object storage bucket​
Zerops creates one bucket automatically for each new Object storage service.
Each Object storage service can only contain one bucket. If your application needs multiple buckets, add more Object storage services.
Name​
Bucket is created with a name based on the selected service name and a random prefix. The name of the bucket cannot be changed later.
Access policy​
The bucket's access policy was defined when the Object storage service was created. You can [change it] later in Zerops GUI.
Quota​
The bucket quota size was defined when the Object storage service was created. You can [change it] later in Zerops GUI.
Copy access details from Zerops GUI​
You will find the Object storage access details under the Access details button in the project dashboard page.
The same information is available in the service detail page under the Access & bucket details menu.
Object storage access parameters​
Parameter | Description |
---|---|
API URL | URL of the Object storage service |
Bucket Name | Bucket is created with a name based on the selected service name and a random prefix. The name of the bucket is fixed and cannot be changed later. |
Access Key ID | The S3 Access Key ID |
Secret Key | The S3 Secret Key |
Use Object storage environment variables​
Zerops creates default environment variables for each Object storage service to help you with connection from any runtime services in the same project. To avoid the need to copy Object storage access parameters manually, use environment variables in your runtime service.
Prefix the environment variable key​
All services of the same project can reference environment variables from other services. To use an environment variable from one service in another service in the same project, you must prefix the environment variable key with the service name and underscore.
Example​
To access the bucketName
env variable of the upload
service, use upload_bucketName
as the env variable key. To access the secretAccessKey
env variable of the storage
service, use storage_secretAccessKey
as the env variable key.
Object storage environment variables​
List of service environment variables is available in Zerops GUI. Go to an Object storage service detail and choose Environment variables in the left menu.
Zerops creates following environment variables when the Object storage service is created:
Variable | Description |
---|---|
apiUrl | URL of the Object storage service |
accessKeyId | The S3 Access Key ID |
secretAccessKey | The S3 Secret Key |
bucketName | Bucket is created with a name based on the selected service name and a random prefix. The name of the bucket is fixed and cannot be changed later. |
quotaGBytes | The bucket quota in GB. |
projectId | ID of the project. Generated by Zerops. |
serviceId | ID of the Object storage service. Generated by Zerops. |
hostname | The name of the Object storage service. |