Back to blog
The Easiest Alternative to S3
Developers need file storage. Simple. However, the options available for storing and retrieving files in the applications developers build has largely been anything but simple. The de-facto solution, and the longest-lived player in the space - Amazon’s Simple Storage Service (S3) - is robust, scalable, reliable, and hard to use.
On The Shoulders Of Giants
Before diving into how Pinata solves for that complexity, creates the simplest file upload, and retrieval experience on the internet, it’s important to acknowledge that S3 does exactly what it’s supposed to. It is a complex product for complex use cases. Without S3, I wouldn’t even be writing this article. In fact, S3 is one of the many cloud providers Pinata uses to power its Files API. But our goal has always been to make developer lives easier.
And that’s exactly what we do with our Files API.
Comparison
Let’s cut right to the chase and look at the complexity of S3 vs. Pinata (S3 on the left, Pinata on the right).
We don’t think developers should have to spend much time thinking about uploads. We built our API and SDK to be as minimal as possible while providing developers with granular control to ensure they only allow the uploads they want and only allow approved retrievals. We did this by abstracting all of the complexity that S3 puts front and center.
Access Controls
What about access controls and buckets and bears oh my?! Pinata does not use the buckets methodology. Instead, we allow developers to group files. Feels more natural to group files than to bucket them, anyway. Unlike S3 buckets, files can live outside groups too. If you don’t need to categorize your uploads, you don’t need to put them in a bucket.
As for access controls, we don’t rely on complicated IAM policies and bespoke rules. Uploads are simple. You generate a limited access key and that can be used for uploads. You control the business logic that allows for that key generation on your own server for maximum ease and flexibility.
For retrievals, you have two ways of enabling access. The first method is a secure access method where you use our API to generate a signed URL. Signed URLs are simply URLs where someone can access a file for a period of time you determine. This is good for ensuring private file access does not leak into the hands of unintended recipients. Alternatively, you can enable full public access to your files by putting them in a group and marking the group as public. This is useful when the files themselves do not need to be private (blogs, social media posts, etc.).
Conclusion
All of this is achieved in just a few lines of code. We think this is a massive step forward for developers, and we’re excited to see what people build. Sign up for Pinata now to experience the new world of file uploads and retrievals.
Happy building!