AWS Project Using Shell Scripting
Project Title - AWS Resource Tracker
Nowadays, many organizations use EC2 instances, S3 buckets, Lambda functions, and IAM for users. It's hard to track the usage of resources manually. This shell script helps to track AWS resources effectively. The AWS CLI fetches information about EC2 instances, S3 buckets, Lambda functions, and IAM users.
How to proceed?
- Install AWS CLI.
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
OR
sudo snap install aws-cli --classic2. Configure the AWS CLI with your AWS Access Key and Secret Key.
3. Create a text file named "aws_resource_tracker.sh" using the VIM editor command and edit it with the script details.
4. Modify the permission of "aws_resource_tracker.sh".
5. Execute the script.
./aws_resource_tracker.sh6. Output.
Automate Using CRON JOB
Get SRIMAN R’s stories in your inbox
Join Medium for free to get updates from this writer.
We need to schedule this script to run at a particular time daily by using the CRON job.
- Create a CRON job
export VISUAL=vi
crontab -e2. Schedule CRON job to run at 6 PM every day
0 18 * * * aws_resource_tracker.sh






