This Bash script fetches and logs details about AWS resources, including S3 Buckets, EC2 Instances, Lambda Functions, and IAM Users. It saves the output in a timestamped log file for tracking.
- ✅ Lists S3 buckets
- ✅ Shows EC2 instances and their states
- ✅ Displays Lambda functions
- ✅ Lists IAM users
- ✅ Saves the report in a log file with a timestamp
- AWS CLI installed and configured
(Runaws configure
to set up credentials.) - Execute permission for the script
(Runchmod +x aws_usage.sh
to make it executable.)
- Clone this repository:
git clone https://github.com/Sujalpatel701/aws_usage.git cd aws_usage
2.Run the script
./aws_usage.sh
3.Check the generated log file in the script directory
ls aws_usage_*.log