Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:12:10+00:00 2026-06-04T07:12:10+00:00

i am working on amazon s3 bucket. And i need to find a size

  • 0

i am working on amazon s3 bucket. And i need to find a size of the folder inside a bucket through the code. I’m not finding any method to find the size of the folder directly. So is there any other way to achieve this function?

EDIT : I’m aware that there is nothing called folders in s3 bucket. But i need to find the size of all files looking like a folder folder structure. That is, if the structure is like this, https://s3.amazonaws.com/****/uploads/storeeoll48jipuvjbqufcap3p6on6er2bwsufv5ojzqnbe01xvw0fy58x65.png then i need to find the size of all files with the structure, https://s3.amazonaws.com/****/uploads/...

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:12:10+00:00Added an answer on June 4, 2026 at 7:12 am

    From AwsConsoleApp.java AWS SDK sample:

    List<Bucket> buckets = s3.listBuckets();
    long totalSize  = 0;
    int  totalItems = 0;
    for (Bucket bucket : buckets)
    {
        ObjectListing objects = s3.listObjects(bucket.getName());
        do {
            for (S3ObjectSummary objectSummary : objects.getObjectSummaries()) {
                totalSize += objectSummary.getSize();
                totalItems++;
            }
            objects = s3.listNextBatchOfObjects(objects);
        } while (objects.isTruncated());
        System.out.println("You have " + buckets.size() + " Amazon S3 bucket(s), " +
                        "containing " + totalItems + " objects with a total size of " + totalSize + " bytes.");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with Amazon's Product Advertising API and need some help on a few
I am working on amazon to vtiger integration, and a code snippet from amazon
Does anyone have any tips on working with Amazon S3 service and Flash? I
I'm working with the Amazon API. I need to convert local time (EDT) to
I'm uploading photos, via PHP, to an Amazon S3 bucket. Everything is working great
createThumb() method working with localhost on apache server.But, the same function not working with
I am working with Amazon In-app-purchases for Android on flash using native extentions. So,
I am working with amazon boto and I have 2 lists. List 1 contains
I am working for a scientific project and would like to use the Amazon
I'm working on an auto-update solution, and I'm using Amazon S3 for distribution. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.