Skip to content

This AWS Cloud Cost Optimization process involves creating a Lambda function to identify and delete unused EBS snapshots. The function checks if a snapshot is associated with any active EC2 instance, and if not, it deletes the snapshot to reduce unnecessary storage costs.

License

Notifications You must be signed in to change notification settings

mukuljoshi01/Lambda-AWS-Proj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Lambda-AWS-Proj

Identifying Unused EBS Snapshots In this example, we will create a Lambda function designed to identify EBS snapshots that are no longer linked to any active EC2 instance and delete them to reduce storage costs.

Description: The Lambda function retrieves all EBS snapshots owned by the same account ("self") and fetches a list of active EC2 instances, including both running and stopped instances. For each snapshot, it checks if the associated volume (if present) is still linked to any active EC2 instance. If the function detects an unused snapshot, it deletes it, helping to optimize storage costs.

About

This AWS Cloud Cost Optimization process involves creating a Lambda function to identify and delete unused EBS snapshots. The function checks if a snapshot is associated with any active EC2 instance, and if not, it deletes the snapshot to reduce unnecessary storage costs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages