Recently I was working on a multi-tenant application. As part of the requirement I had to support separate S3 buckets for tenants for security concerns. Having multiple buckets sounds good when we talk about production environments with respect to costing. But I had to solve the problem for development environment where multiple developers would be configuring different customers for testing. How would we manage so many buckets? How would we cleanup? How would we reduce the cost here? I started with having a file based implementation for development use case, but we would never be able to run the actual code in development environment.

With little bit of exploration, I found MINIO to be a good fit to solve this problem. MINIO can easily be configured locally. It provides wide range of setup instructions depending on the use and environment. MINIO provides APIs similar to Amazon S3 and S3 Client code can be used to interact MINIO server. With adequate configurations MINIO can also be used for production use cases. This any way need some more exploration on licensing and setup configurations, meanwhile here we will stick to development use case.

MINIO Setup

MINIO setup document can be followed for setting it up in various environment. But when I am taking about development purpose, I use the docker way of running it in my local. Please note it’s volatile, when you run like this. Stopping the container will erase out all the data.

docker run -p 9001:9000 minio/minio server /data

You may use the default credentials ‘minioadmin:minioadmin’ to access the object store both from application and web console.

Now we are all ready with the MINIO server and can write the S3 client code to do all the operations.

You can check the sample project in www.github.com for an implementation, which works with both Amazon S3 and MINIO using a toggle configuration.

With the current trends of cloud computing world, we might have challenges reducing overall development cost. While we still can directly use cloud solutions for development environment, some of these tricks sometime helps us save some money.

Randa Khaled

Randa Khaled

Author Since: November 19, 2020

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x