0% found this document useful (0 votes)
18 views9 pages

AWS Waste Management Application

The document outlines a step-by-step guide for managing AWS resources using the AWS Cleanup Tool, including creating a Lambda function to delete unused resources, setting up an API Gateway, and notifying users via SNS. It details specific checks for various AWS resources like EC2 instances, EBS volumes, and S3 buckets to determine their utilization. The process culminates in verifying the successful deletion of resources and the proper functioning of the AWS Cleanup Tool.

Uploaded by

suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views9 pages

AWS Waste Management Application

The document outlines a step-by-step guide for managing AWS resources using the AWS Cleanup Tool, including creating a Lambda function to delete unused resources, setting up an API Gateway, and notifying users via SNS. It details specific checks for various AWS resources like EC2 instances, EBS volumes, and S3 buckets to determine their utilization. The process culminates in verifying the successful deletion of resources and the proper functioning of the AWS Cleanup Tool.

Uploaded by

suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

AWS Cloud Waste Management

Client Application - AWS Cleanup Tool

Architect Diagram –

Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)


Follow the below steps to manage the AWS resources.

Step 1 - Create a lambda function that will delete the resources not utilized for more than 30 Days.
EC2 Instances: stopped for more than 30 days.
EBS Volumes: Check the last attached time to the instance.
Elastic IPs: Check if they have been associated with any instance.
S3 Buckets: Use the last-modified date of objects within the bucket to determine if they are unused.
RDS Instances: Check if the RDS instances have been in the stopped state for more than 30 days.

Note – You can implement it for all AWS resources.

Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)


Step 2 - Create API Gateway to invoke the lambda function

Step 3 – Update the below API Gateway CORS Configuration under the Header.

 Access-Control-Allow-Origin: *

 Access-Control-Allow-Methods: GET,OPTIONS

 Access-Control-Allow-Headers: Content-Type

Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)


Step 4 - Deploy API, you will get the invoke URL

Step 5 – Add the invoke URL in the client Application (AWS Cleanup Tool)
Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)
Step 6 – Create an SNS Topic to Notify the user of the success/failure of the event.

Step 7 – Add the SNS topic to the destination of the lambda function

Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)


Step 8 - Create S3 Bucket

Step 9 - Upload your static website (Client Application) in S3 Bucket

Step 10 - Give the required permission, and check the website is available on internet.

Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)


NOTE – For Demo purposes, I have deleted the resources that have not utilize more than 1 Day.

Step 11 – Resources that are not utilized for more than 1 day.

EC2 Instance

EBS Volume

Now Let's Run the AWS Waste Manager Application.

Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)


Step 12 – Fetch the AWS Waste Manager Application and Click on the AWS Cleanup Tool Button.

Step 13 – You will get the successful message below the button

Step 14 – Now Verify whether Resources Get Delete or not.

EC2 Instance

Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)


EC2 Instance Successfully Terminated.

EBS Volume

Unattached EBS Volume Also gets Deleted.

Step 15 – Check the Output of the Lambda Function

We have successfully implemented the AWS Cleanup Tool.

Prepared by – Atish Sonawane (linkedin.com/in/atish-sonawane)

You might also like