In Current Situation Companies are focusing on COST optimization, So We currently going to focus on RDS & Elastic Load Balancers in AWS resources, RDS & ELB resources can become orphaned but continue to incur costs
Elastic Load Balancer
ELB is a key AWS service that automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses. It improves application availability and fault tolerance by balancing load across multiple resources. However, as applications and environments change, some ELBs can become detached from their target resources or are left behind after the resources they were supporting are terminated.
Orphaned ELBs
Identifying and removing orphaned ELBs involves checking whether the ELB is associated with any active targets or resources
Step-by-step guide using :
Using Console
Navigate to the Elastic Load Balancing console.
Review the list of ELBs and check their associated instances, targets, or services.
If an ELB has no associated targets or instances, it may be orphaned.
Select the orphaned ELB. > Choose Actions > Delete\>Confirm the deletion.
Using AWS CLI
You can use AWS CLI commands to list ELBs and check their status. Here's a basic approach:
# ELB with no instances listed is likely orphaned.
aws elb describe-load-balancers --query "LoadBalancerDescriptions[*].[LoadBalancerName,Instances]" --output table
# To remove the identified Orphaned ELBs
aws elb delete-load-balancer --load-balancer-name <your-elb-name>
RDS (Relational Database Service)
Amazon RDS simplifies the setup, operation, and scaling of relational databases in the cloud.
Orphaned RDS
To find & remove orphaned RDS instances, look for instances with no CPU utilization, low IOPS, or those running without any recent connections.
Step-by-step guide using:
Check Cloud Watch metrics: Monitor RDS metrics like CPU utilization, database connections, and read/write IOPS
Analyze Billing Reports: Look for any unusual charges.
Notify Stakeholders: Inform relevant parties about the orphaned instances.
Backup Before Delete: Ensure you have a backup of any important data.
Terminate the instance: Delete the orphaned RDS instance.
Summary
Orphaned Elastic Load Balancers and RDS can silently inflate your AWS bill, but with a bit of regular maintenance, you can easily identify and remove them. This not only helps in cost optimization but also keeps your AWS environment clean and efficient.