Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS] Update migration docs to use path #7143

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ import common_configureaccess from '/src/fragments/lib/storage/native_common/con

<InlineFilter filters={['javascript', 'react-native', 'angular', 'nextjs', 'react', 'vue']}>

<Callout warning>
We recommend using the new [Amplify Gen2](https://docs.amplify.aws/gen2/build-a-backend/storage/) experience when defining file access permissions as it offers a more flexible approach to customize access to files.

Note: `accessLevel` parameter is deprecated and maybe removed in next major version.
jimblanc marked this conversation as resolved.
Show resolved Hide resolved
</Callout>

Storage module can manage files with three different access levels; `guest`, `protected` and `private`. The Amplify CLI configures three different access levels on the storage bucket: guest, protected and private. When you run `amplify add storage`, the CLI will configure appropriate IAM policies on the bucket using a Cognito identity pool Role. You will have the option of adding CRUD (Create/Update, Read and Delete) based permissions as well, so that Authenticated and Guest users will be granted limited permissions within these levels.

If you had previously enabled user sign-in by running `amplify add auth` in your project, the policies will be connected to an `Authenticated Role` of the identity pool which has scoped permission to the objects in the bucket for each user identity. If you haven't configured user sign-in, then an `Unauthenticated Role` will be assigned for each unique user/device combination, which still has scoped permissions to just their objects.
Expand Down Expand Up @@ -84,9 +90,9 @@ import { getUrl } from 'aws-amplify/storage';
await getUrl({ key: 'welcome.png' }); // Get welcome.png in public space
```

## Customization
## Customization (Deprecated)

### Customize Object Key Path
### Customize Object Key Path (Deprecated)

You can customize your key path by defining a prefix resolver:

Expand Down
Loading
Loading