Cees-Jan

- Post source at 🐙

Counting your S3 buckets the lazy way

As a programmer, counting a bunch of items on a webpage is a quick task when you automate it. In this tiny post I'll explain how to count your S3 buckets with a single line of jQuery.

Amazon Web Services Logo

So before we can get started head to the AWS console and open S3.

In Chrome

Open your developer console and go the console tab and locate <top frame>. That is a dropdown, click it and select Console.html.

Chrome S3 iframe

Now run the following bit of jQuery:

$('#bucket-list-view tbody tr').length;

This returns the number of buckets on your account.

Other browsers

Open your developer console and head to the elements tab. Locate the iframe directly under the body element.

S3 iframe

Now open that iframe in the new tab and open your developer console again. Go to the console tab and run the bit of jQuery mentioned above.

Conclusion

These little things make my line of work just that extra bit more fun.


Categories: AWS - S3 - JavaScript - jQuery