TL;DR
The AWS S3 Bucket Storage Browser is a new, easy-to-use tool from Amazon that allows developers to add a simple interface for browsing, uploading, and downloading data stored in S3 buckets. This open-source React component can be integrated into web apps to help users manage S3 data easily, using built-in authentication options like Amplify or custom setups. Currently in developer preview, this tool aims to simplify cloud storage access and management for end-users.
Overview
Amazon has introduced a new feature for S3 users: StorageBrowser for Amazon S3. This open-source React component from Amplify UI lets developers add a simple interface to their web apps, allowing users to easily browse, download, and upload data stored in Amazon S3. With StorageBrowser, managing cloud storage is simpler than ever, whether you are a developer or an end-user who needs easy access to cloud data.
The StorageBrowser is currently in developer preview while Amazon collects feedback to improve it. During this phase, the API may change, so it’s best not to use it in production until it’s fully released.
Let’s look at what makes StorageBrowser useful for AWS S3 users, its features, setup, and use cases.
What is AWS S3 StorageBrowser?
StorageBrowser for S3 is a React component that gives your app users an easy way to interact with Amazon S3. Instead of building a custom interface to let users view, upload, or download files in S3 buckets, you can integrate StorageBrowser and save development time while giving users a great experience.
This component only shows the data that users are allowed to access and is optimized for fast uploads and downloads. Developers can manage data access based on user identity using AWS security services like IAM or even their own custom authentication systems.
Main Views in StorageBrowser for S3
StorageBrowser for S3 has three main views to improve the user experience:
- Locations View: This is the first screen that shows users the S3 resources they have access to and their permissions. S3 locations could be defined by Amazon S3 Access Grants or set up manually.
- Location Detail View: This is a file browser-like interface where users can explore files and folders in S3, and upload or download them. It gives a visual experience similar to traditional file browsers.
- Location Action View: This view appears when users choose actions like uploading new files, making it easy to add data to an S3 bucket.
How to Set Up and Use AWS S3 StorageBrowser
Setting up StorageBrowser is simple, and you can choose from three authentication methods to integrate it effectively into your app.
- Amplify Authentication
- If you are already using Amplify, this is the quickest way to get started. It uses Amazon Cognito for authentication and IAM policies for authorization. With Amplify Gen 2, you can easily customize access rules for users and groups.
- AWS IAM Identity Center and S3 Access Grants
- This is ideal if you want to grant access on a per-prefix basis. Using IAM Identity Center along with S3 Access Grants, your app can request access to S3 buckets based on the authenticated user’s identity without mapping them directly to an IAM principal.
- Custom Authentication
- If you have your own custom authentication system, you can set up StorageBrowser to work with it. You can provide a list of S3 locations for users and supply scoped credentials as needed.
Installation and Integration
To install StorageBrowser for S3, add the necessary Amplify UI packages to your app by modifying your package.json
or installing via npm:
npm i --save @aws-amplify/ui-react-storage@storage-browser aws-amplify@storage-browser @aws-amplify/storage@storage-browser
Once installed, you can create and use the StorageBrowser component directly in your frontend code:
import { StorageBrowser } from '@aws-amplify/ui-react-storage';
import '@aws-amplify/ui-react-storage/storage-browser-styles.css';
export default function App() {
const defaultPrefixes = [
'public/',
(identityId) => `protected/${identityId}/`,
(identityId) => `private/${identityId}/`,
];
return (
<StorageBrowser defaultPrefixes={defaultPrefixes} />
);
}
This simple integration adds a powerful file-browsing feature to your web app with minimal effort.
Use Cases for AWS S3 StorageBrowser
The StorageBrowser can be useful in many situations, including:
- Data Management Portals: Companies can create data portals where employees or clients can upload documents, download files, or manage data without complex backend setup.
- Media Upload Tools: Developers can build tools that let users upload images or videos to S3 for storage or processing, like content submission platforms.
- Internal Document Repositories: Internal teams can easily browse and access company documents stored securely in S3.
Developer Feedback and Preview
The AWS S3 StorageBrowser is currently in developer preview, and AWS is seeking feedback from users about bugs, new features, and improvements. The goal is to refine the component and make it as helpful and stable as possible before it is fully released.
If you want to provide feedback, check out the repository and discussions on GitHub. AWS aims to address user feedback quickly and improve the component based on community input.
Conclusion
The AWS S3 StorageBrowser is a great tool that helps developers quickly add an easy-to-use data management interface to their apps. By using this tool, you save valuable development time and make it easier for your users to interact with cloud storage. With flexible authentication options and a simple installation process, StorageBrowser is perfect for any app that works with Amazon S3 data.
If you’re interested in using StorageBrowser for your app, follow the steps above and try it out during its developer preview phase. It’s a great way to make cloud storage more user-friendly for both you and your users.