As we have discussed in previous post below that extracting the S3 bucket report for large enterprise can take too much time if not utilizing CloudWatch.
Solution – Slowness in getting AWS S3 Buckets Counts and Sizes | Tech Wizard
In this post I am sharing the whole Script that we have written for generating the AWS S3 Buckets Report.
Prerequisites for this Solution:
Download the script from Git or PowerShell gallery from below links:
Git:
https://github.com/VikasSukhija/Downloads
AWSS3BucketsReport.ps1
PowerShell Gallery:
https://www.powershellgallery.com/packages/AWSS3BucketsReport
Install-Script -Name AWSS3BucketsReport
Update the below section of the script with your own parameters:
This script needs access and secret key of the account that can assume a role that has access to read the AWS S3 objects and CloudWatch across the whole organization.
Note: Please secure the access key and secret key as encrypted if you will schedule this script in production.
Script will fetch below details for each AWS database, will generate csv file and send on email.
Here is the Email that email address mentioned in variable will receive.
Here is the CSV report that your will get:
You can modify the script as per your requirements.
Thanks for reading and downloading…
Tech Wizard
https://techwizard.cloud
https://syscloudpro.com/
PowerShell Fast Track