|
| 1 | +export const metadata = { |
| 2 | + title: `S3 Storage`, |
| 3 | +} |
| 4 | + |
| 5 | +# {metadata.title} |
| 6 | + |
| 7 | +In this guide, you'll learn about the managed S3 storage service that Cloud provides as part of your project environments. |
| 8 | + |
| 9 | +## Managed S3 Storage Service |
| 10 | + |
| 11 | +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. |
| 12 | + |
| 13 | +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. |
| 14 | + |
| 15 | +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. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Configured S3 File Module Provider |
| 22 | + |
| 23 | +Cloud automatically configures your Medusa application to use the [S3 File Module Provider](!resources!/infrastructure-modules/file/s3). |
| 24 | + |
| 25 | +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. |
| 26 | + |
| 27 | +<Note> |
| 28 | + |
| 29 | +If you're using a Medusa version before v2.7.0, [contact support](#) for assistance in configuring the S3 File Module Provider. |
| 30 | + |
| 31 | +</Note> |
| 32 | + |
| 33 | +### Access S3 Configurations |
| 34 | + |
| 35 | +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. |
| 36 | + |
| 37 | +### Override S3 Configurations |
| 38 | + |
| 39 | +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. |
| 40 | + |
| 41 | +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](!resources!/infrastructure-modules/file/s3) for more details on how to configure it. |
| 42 | + |
| 43 | +<Note title="Tip"> |
| 44 | + |
| 45 | +To set the connection options of your external S3 instance, refer to the [Environments](../environments/page.mdx#add-environment-variables) 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. |
| 46 | + |
| 47 | +</Note> |
0 commit comments