- CDN: The default provider used by Cosmo Cloud.
- Amazon S3: An object storage protocol. We support any S3 compatible object-storage e.g. Minio and AWS.
Define a provider
Before you can use a storage provider, you have to define it in thestorage_providers section of your config.yaml file. Each provider is given an id that you reference from other configuration sections.
secure has to be set to
true when you point to an S3 that uses https://node IAM roles you don’t need to provide an access_key or secret_key and the S3 client will handle this on your behalf.
Using storage providers
Once a provider is defined, you reference it byprovider_id in the configuration of each feature. The following features support custom storage providers:
- Execution config — load the router execution configuration from S3 instead of the Cosmo CDN.
- Persisted operations — load individual persisted operations or the PQL manifest from S3.
Configuration via environment variables
Storage providers can also be configured entirely through environment variables using indexed notation. This is useful in containerized deployments or when secrets should not live in config files. See the configuration reference for the full list of environment variables for each provider type.Best Practices
- Create different S3 credentials for READ and WRITE to reduce the attack surface.