S3 Storage

In this guide, you'll learn about the managed S3 storage service that Cloud provides as part of your project environments.

Managed S3 Storage Service#

Cloud offers a managed S3 storage service for your project environments. Each environment has its own dedicated S3 bucket that is automatically provisioned when the environment is created.

So, when you create a new project, Cloud creates a production S3 bucket for the production environment. If you create a staging environment, Cloud creates a separate S3 bucket for that environment as well.

By default, the S3 bucket is private, but the files you upload to the bucket are publicly accessible. This is necessary for serving product images and other assets in your Medusa application.

Diagram showcasing S3 isolation between environments


Configured S3 File Module Provider#

Cloud automatically configures your Medusa application to use the S3 File Module Provider.

So, you don't need to configure the S3 File Module Provider or set up S3 manually. Also, if you have the S3 File Module Provider configured in medusa-config.ts, remove it to avoid conflicts.

Note: If you're using a Medusa version before v2.7.0, contact support for assistance in configuring the S3 File Module Provider.

Access S3 Configurations#

Since Cloud is a managed service, you can't directly access your S3 bucket or its configurations. Cloud also doesn't expose the S3 bucket connection or configuration details.

Override S3 Configurations#

If you need to override the default S3 configurations, such as changing public access to assets, you can do so by setting up and managing your own S3 bucket externally.

Then, configure the S3 File Module Provider in your medusa-config.ts file to connect to your external S3 instance. Refer to the S3 File Module Provider documentation for more details on how to configure it.

Tip: To set the connection options of your external S3 instance, refer to the Environments guide to learn how to add environment variables. You can then use these variables in your medusa-config.ts file to connect to your S3 instance.
Was this guide helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break