-
Notifications
You must be signed in to change notification settings - Fork 277
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
StorageBrowser RFC #5731
Comments
looks awesome. I'm now desperate to see examples of validation / feedback of the upload. for example, after uploading a CSV, a table listing the rows, together with valid/invalid. |
Awesome,thanks for this launch, can't wait to test these features |
Very nice, would be even more awesome if a simple search functionality based on s3 prefixes were added. |
Great feature, very impressed
Looking forward to the release! |
Just set up the Storage Browser in my environment, and I'm loving it! a couple of questions:
|
Awesome package, can this use cdn(cloudfront) for file browsing and downloading and keep the bucket read access only on cdn and do we have multi bucket support |
Hello @reesscot , Great feature! Could you please provide an approximate target date for the release of the production-ready version? |
Really nice RFC 👍 Looking forward to it! Feature Request:
|
Nice, looks super exciting
Thanks :) |
AWS S3 SDK provides an "endpoint" parameter, can we configure that with this new UI browser ?
|
Need some help guys, not able to run it :(
Usage
amplify/storage/resource.ts
What I am missing ? What I am doing wrong ? Getting this error always when attempting to build/run the project :(
Is this an error with
|
@reesscot , do you have somewhere published a working version/project/template of this RFC please ? |
@scorobogaci It looks like you're getting the wrong versions of the dependencies somehow, can you try forcing the storage-browser version of the
Alternatively, you could try this example repo which we've been testing with on Next.js: https://github.com/timngyn/nextjs-storage-browser/tree/main |
@tttol @scorobogaci In regards to the styling questions, can you tell me what order you are imported the CSS in? Also, do you have any other CSS styling that might be conflicting in your app? |
Overview
StorageBrowser
for Amazon S3 is an open source Amplify UI React component customers can add to their web applications to provide end-users with a simple interface for data stored in Amazon S3. Using StorageBrowser for S3, customers provide authorized end-users access to easily browse, download, and upload data in Amazon S3 from their own applications. StorageBrowser for S3 only displays the data that your end-users are authorized to access and automatically optimizes requests to deliver high throughput data transfer. You can control access to your data based on your end-user’s identity using AWS security and identity services or your own managed services.StorageBrowser for S3 is currently in developer preview while we collect your feedback before making the component generally available. The API might change while in developer preview so we do not recommend using it in production until it is generally available. We will post updates to this RFC as we make changes to the component.
StorageBrowser for S3 has 3 main views:
1 Installation #
You can install StorageBrowser for S3 from tagged versions of the @aws-amplify/ui-react-storage and aws-amplify packages. Add these dependencies to your package.json file:
Or add them via
npm
:We will publish StorageBrowser for S3 to the latest version of these packages once it is generally available.
2 Setting up authentication and authorization #
In order to show S3 locations and their contents to end users, you first need to set up your preferred authentication and authorization methods. There are 3 ways you can set up authentication/authorization with the storage browser component:
Amplify auth
Make sure you have an Amplify project started, by following the getting started guides: https://docs.amplify.aws/react/start/quickstart/. Then create an S3 bucket with access rules by defining a storage resource and adding authorization rules https://docs.amplify.aws/react/build-a-backend/storage/authorization/:
In your frontend code, create the
StorageBrowser
component with the Amplify Auth adapter:Or if you want to use Amplify Auth with prebuilt Amplify UI you can just import the default
StorageBrowser
component and render it:AWS Identity Center and S3 Access Grants
For detailed setup instructions see this blog post: https://aws.amazon.com/blogs/storage/how-to-develop-a-user-facing-data-application-with-iam-identity-center-and-s3-access-grants/
Once you have IAM Identity Center and S3 Access Grants set up, in your React application you can use
createManagedAuthAdapter
to set up the auth rules andcreateStorageBrowser
to create theStorageBrowser
component:Go to step 3
Custom authentication and authorization
You can also use StorageBrowser for S3 with your own authentication and authorization setup. Rather than calling
createManagedAuthAdapter
orcreateAmplifyAuthAdapter
you can directly configure how StorageBrowser for S3 lists S3 locations and gets credentials for each location:3 Rendering the StorageBrowser #
Now that you have created the
StorageBrowser
component using one of the 3 auth methods above, you can place the component into your app:4 Customizing the StorageBrowser #
Composing
StorageBrowser for S3 has 3 main views that can be composed into your application if you want to move around parts of the component:
LocationsView
: initial screen showing a table with all S3 locations a user has access toLocationDetailView
: file browsing view once the user has selected an S3 locationLocationActionView
: view rendered when the user initiates an action like uploading filesFor example, to display the
LocationsView
(locations table) side-by-side with theLocationDetailView
(file browser table) with theLocationActionView
in a dialog:Using a custom UI
createStorageBrowser
improves bundle size by shipping without Amplify UI React Primitives, rendering basic HTML elements by default with only layout styling applied.You can control all of the elements used in the
StorageBrowser
component by passing in elements to thecreateStorageBrowser
function. Elements have a variant prop that is used to signify where that element is being used within the component tree of theStorageBrowser
. For example, theButton
element is used in many different places in theStorageBrowser
UI,variant
allows you control over how your button looks and behaves in different usage scenarios:Here are all the elements that you can override:
Feedback for dev preview #
We are looking for any and all feedback on StorageBrowser for S3. We would love to hear from you about bugs, aspects about the developer experience and APIs that could be improved, additional features and functionality you need, and more. We plan on addressing all of your feedback as it comes in.
Thank you to everyone that made this launch possible: @reesscot @calebpollman @timngyn @esauerbo @hbuchel @AllanZhengYP @jimblanc @ashwinkumar6 @Jordan-Nelson @haverchuck
The text was updated successfully, but these errors were encountered: