I'd like to ask for advice on AWS 3.

Asked 2 years ago, Updated 2 years ago, 37 views

While creating a web messenger, I want to save files exchanged in each chat window in aws3. If you give the bucket name as the name of the chat room, you can't access the bucket when you leave the room (ex. Kakao Talk: Files evaporate when you leave the room) I'm thinking of managing each individual by giving a bucket with a specific name.
I know that the number of buckets increases if you pay a certain amount of money, but there is no way to find the capacity limit, so I wonder if you can give the capacity limit of each bucket separately. Or is there a good way in aws3 to manage the data like this?

aws

2022-09-21 17:17

2 Answers

Looking at the previous question, I think you're working on Javascript.

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html If you look at , there is no API to get bucket capacity.

All files in bucket can be retrieved through listObjects as shown below. You can also read the size of each file.

s3.listObjects({Bucket: 'bucketname'}, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

I think we can call it up like this and add all the files, but if there are more files, it might be inefficient to call it up like this every time.


2022-09-21 17:17

Giving bucket to each chat room is not a good way.

Although it is not explicitly stated, the maximum number of buckets per AWS account is initially limited to 100. If you apply, you will increase it, but if you try to increase it too much, you will likely ask why and say no.

There is a way to create a file address called Signed URL that has permission only within a certain time, so please refer to it....

https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html


2022-09-21 17:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.