You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -78,24 +78,26 @@ You can refer to [Amazon S3's Policies and Permissions documentation](https://do
78
78
In order to make calls to your manually configured S3 bucket from your application, you must also set up a [CORS Policy](/[platform]/build-a-backend/storage/extend-s3-resources/#for-manually-configured-s3-resources) for the bucket.
79
79
</Callout>
80
80
81
-
### Specify S3 bucket in Amplify's backend config
81
+
### Specify the S3 bucket in Amplify's backend config
82
82
83
83
Next, use the `addOutput` method from the backend definition object to define a custom S3 bucket by specifying the name and region of the bucket in your `amplify/backend.ts` file. You must also set up the appropriate resources and IAM policies to be attached to the backend.
84
84
85
85
<Callout>
86
86
**Important:** You can use a storage backend configured through Amplify and a custom S3 bucket at the same time using this method. However, the Amplify-configured storage will be used as the **default bucket** and the custom S3 bucket will only be used as an additional bucket.
87
87
</Callout>
88
88
89
+
#### Configure the S3 bucket
90
+
89
91
Below are several examples of configuring the backend to define a custom S3 bucket:
90
92
91
93
<BlockSwitcher>
92
94
<Blockname="Guest Users">
93
95
Below is an example of expanding the original backend object to grant all guest (i.e. not signed in) users read access to files under `public/`:
Below is an example of expanding the original backend object to grant all authenticated (i.e. signed in) users with full access to files under `public/`:
Below is an example of expanding the original backend object with user group permissions. Here, any authenticated users can read from `admin/` and `public/` and authenticated users belonging to the "admin" user group can only manage `admin/`:
0 commit comments