How to implement custom storage quotas using Amazon S3 as storage like dropbox

Actually, smart minds are needed to help me with this. I am stuck! I am implementing a system in which users will be allowed to upload videos and files to my site. Currently, I give them FTP access to their own ftp user account, where they upload the necessary files. FTP on linux server supports user quotas.

However, now I need to transfer the boot protocol from ftp and see the amazon s3 file upload system via http. ftp just gives too many problems with firewalls, ports, active, passive .. the list goes on. :) Although downloading http s3 will be just a matter for the user, allowing Internet access to the desktop application that will be loading.

I have everything to work fine to the extent that I need to set a quota for each user. How do I implement storage quotas on a system like Amazon s3 that doesn't support it? I can’t provide unlimited access to my users, and I don’t want to place my server in the middle, because it just means that my server will have to receive the file and then upload it to the backend on s3, which can be done by installing s3 as a disk , but then again returned to downloading via ftp to my servers on the installed s3 drive.

I want my application to be downloaded directly to the s3 server, but support user quotas by loading them into the psuedo amazon folder in 1 bucket. Each user will receive a subfolder in the bucket that they load.

What will be the implementation / logic to make this work?

I put another server to monitor the user, looking at the files in / keyname / to find out how many storages are used by this key, which will useraccount? Wouldn’t it cost a lot of money in terms of updating the status of each use of the account?

Help, I need a strategy. Something similar to the implementation of dropbox for storage on s3, but with quota restrictions for custom downloads.

+7
source share
2 answers

You will need to track the quota on your own server.

If you have control over the client, you can demand that they send the file size to your server before uploading to Amazon and deny it if it exceeds the quota.

If you do not, you can let download

+1
source

If you want AWS WorkDocs custom repository to be the solution you're looking for. Creating a Bucket for each user is not an alternative, as the number of Buckets you can create is very limited.

However, I cannot tell you how quotas apply.

-one
source

All Articles