Mindfulness

Declutter AWS Services

Updated · By the Relaxmid editors

Reading time
10 min
Sections
20
Topic
Mindfulness

Yes, you can declutter AWS Services to reduce costs and improve security, but the process depends on how you currently use the account and which services are running idle. Every unused or orphaned service adds to your monthly bill and creates more surfaces for attackers to target. The first step is to identify exactly which services are active, then remove or shut down those that are not needed right now.

Below is a practical way to work through this, starting with a quick checklist and then moving into the detailed steps you need to follow to clean up your account safely.

Quick-Start Checklist

  • Review your billing dashboard to see which services have the highest spend.
  • List all resources in your account (EC2 instances, S3 buckets, Lambda functions, etc.).
  • Identify idle resources that have been turned on for a long time with no recent activity.
  • Check for unused IAM roles and policies that grant access to services you no longer use.
  • Remove or archive old data in S3, RDS snapshots, and other storage systems.

Signs You Need to Declutter

Not every idle service needs to be removed immediately. Look for these clear signs that your AWS account has become cluttered:

  • Unused EC2 instances running 24/7 with no user activity for weeks.
  • Stale S3 buckets that hold old backups or static files no longer referenced by your application.
  • Orphaned RDS databases created for one-time tasks or experiments that were never deleted.
  • Unused IAM roles and policies that still grant access to services you have retired.
  • Old CloudWatch alarms that are no longer relevant or have stopped firing.
  • Unattached EBS volumes that are not part of a running instance.
  • Unused Elastic IPs that have been floating for months without being attached.

Step-by-Step: Review Your Billing Dashboard

The billing dashboard is the best place to start because it shows you where your money is actually going. You can filter by service to see which ones are consuming the most resources.

  1. Open the AWS Billing and Cost Management console.
  2. Go to the Billing Dashboard.
  3. Use the By Service chart to see which services have the highest spend.
  4. Click on a service name (for example, EC2) to open its cost breakdown.
  5. Look for services that are consistently high but have low usage in your application logs.

Services that show high spend but very little activity are often the best candidates for removal. For example, an EC2 instance that costs $200 a month but has no login attempts or API calls for 30 days is a strong candidate for shutting down.

Step-by-Step: List All Resources in Your Account

Once you have a rough idea of which services are expensive, you need a complete inventory of everything in your account. This ensures you do not accidentally delete something that is still needed.

  1. Open the AWS Management Console.
  2. Go to the CloudFormation console and click Stacks.
  3. 3. For each stack, look at the Resources tab to see what it creates.

  4. Open the EC2 console and use the Instances page to list all running and stopped instances.
  5. Open the S3 console and use the Buckets page to list all buckets.
  6. Open the RDS console and use the Databases page to list all databases.
  7. Open the IAM console and use the Roles and Policies pages to list all roles and policies.

Step-by-Step: Identify Idle Resources

With your list of resources in hand, you can now identify which ones are idle. Idle resources are those that have not been used for an extended period.

  1. For each EC2 instance, check the Last Launched or Launch Time field.
  2. For each S3 bucket, check the Last Activity or Last Modified date on objects inside it.
  3. For each RDS database, check the Last Backup or Last Updated timestamp.
  4. For each IAM role, check the Creation Date and the Last Used timestamp (if available).
  5. For each EBS volume, check the Attach Date to see when it was last attached to an instance.
  6. For each Elastic IP, check the Association Time to see when it was last attached.

Set a threshold for yourself. For example, any resource that has not been used for more than 30 days is likely safe to shut down or delete, provided you have reviewed it carefully.

Step-by-Step: Remove or Shut Down Unused Services

With your list of idle resources, you can now remove or shut down the services that are no longer needed. The exact steps differ by service, but the general process is the same.

Shutting Down EC2 Instances

  1. Open the EC2 console and go to the Instances page.
  2. Select the instance you want to shut down.
  3. Click Instance State and then Stop if you plan to use it again later.
  4. Click Instance State and then Terminate if you never plan to use it again.
  5. Confirm the action when prompted.

Stopping an instance pauses its billing but keeps its configuration. Terminating an instance deletes the instance and its EBS volume, so make sure you have backed up any data you need before you terminate.

Deleting S3 Buckets

  1. Open the S3 console and go to the Buckets page.
  2. Select the bucket you want to delete.
  3. Go to the Permissions tab and check the Block Public Access settings.
  4. Go to the Objects tab and select all objects (if any).
  5. Click Delete and confirm the action.
  6. Go back to the Bucket overview and click Delete bucket.

S3 buckets cannot be deleted if they contain objects. You must delete all objects first, and you must have the correct permissions to do so.

Deleting RDS Databases

  1. Open the RDS console and go to the Databases page.
  2. Select the database you want to delete.
  3. Click Actions and then Delete database.
  4. Choose whether to delete the automated backups.
  5. Confirm the action.

Be careful when deleting RDS databases. Automated backups are useful for recovering from accidental changes. Only delete backups if you are certain you will not need to restore the database.

Removing Unused IAM Roles and Policies

  1. Open the IAM console and go to the Roles page.
  2. Select the role you want to delete.
  3. Click Delete role and confirm the action.
  4. Go to the Policies page and select the policy you want to delete.
  5. Click Delete policy and confirm the action.

IAM roles and policies cannot be deleted if they are still attached to a resource. You must first detach them from all resources before you can delete them.

Step-by-Step: Archive Old Data

Some resources cannot be deleted, but they can be archived to reduce costs. For example, you can move old S3 objects to a lower-cost storage class like S3 Glacier.

  1. Open the S3 console and go to the Buckets page.
  2. Select the bucket containing the data you want to archive.
  3. Go to the Objects tab and select the objects you want to archive.
  4. Click Change storage class and select Glacier Deep Archive or Glacier Flexible Retrieval.
  5. Confirm the action.

Glacier storage classes are designed for long-term archival. Retrieving data from them can take several hours, so make sure you only archive data that you do not need to access immediately.

Step-by-Step: Clean Up CloudFormation Stacks

CloudFormation stacks are collections of AWS resources defined by a template. If you create a stack for a one-time task and forget to delete it, it will continue to consume resources.

  1. Open the CloudFormation console and go to the Stacks page.
  2. Select the stack you want to delete.
  3. Click Delete stack.
  4. Confirm the action.

CloudFormation will delete all resources defined in the stack. Make sure you have reviewed the stack template to understand what it creates before you delete it.

Step-by-Step: Set Up Budget Alerts

Decluttering is an ongoing process. To prevent your account from becoming cluttered again, set up a budget alert to notify you when you exceed a certain amount of spend.

  1. Open the AWS Billing and Cost Management console.
  2. Go to the Budgets page and click Create budget.
  3. Choose Monthly budget or Accumulated budget.
  4. Set the budget amount and the timeframe.
  5. Add a notification for when the budget is exceeded.
  6. Confirm the budget.

Budget alerts are a proactive way to keep your AWS costs under control. They will notify you when you are approaching your limit, giving you time to review your usage and remove any unnecessary services.

Step-by-Step: Document Your Cleanup Process

Documenting your cleanup process is important for future reference. It will help you remember why you made certain decisions and make it easier to clean up again in the future.

  1. Create a simple document (for example, a text file or a spreadsheet) that lists the services you removed and why.
  2. 2. Include the date you removed each service and the reason for removal.

  3. Attach any relevant screenshots or logs to the document.
  4. Share the document with your team so everyone is aware of the changes.

Having a documented cleanup process will make it easier to maintain a clean AWS account over time.

Step-by-Step: Schedule Monthly Reviews

To keep your account clutter-free, schedule a monthly review. This should take about 15-30 minutes and can be done at the end of each month.

  1. Review your billing dashboard to see which services have the highest spend.
  2. 2. Check your resource inventory for any new idle resources.

  3. Remove or shut down any resources that are no longer needed.
  4. Archive old data to lower-cost storage classes.
  5. Update your documentation with any changes.

A monthly review is a small investment of time that can save you significant money and reduce your security risks.

Step-by-Step: Test After Each Cleanup

After you remove or shut down a service, it is important to test your application to make sure it still works correctly. This will help you avoid accidental downtime.

  1. After you shut down an EC2 instance, verify that your application can still function.
  2. 2. After you delete an S3 bucket, verify that your application can still access the data it needs.

  3. After you delete an RDS database, verify that your application can still connect to the database it needs.
  4. After you remove an IAM role, verify that your application can still perform the actions it needs.

Testing is an essential part of the cleanup process. It will help you catch any issues before they become serious problems.

Step-by-Step: Use AWS Config for Ongoing Monitoring

AWS Config is a service that helps you assess, audit, and evaluate the configurations of your AWS resources. You can use it to set rules that automatically detect idle resources.

  1. Open the AWS Config console and click Get Started.
  2. 2. Select the resources you want to monitor (for example, EC2 instances, S3 buckets).

  3. Choose the rules you want to apply (for example, IdleInstance, S3BucketPublicWrite).
  4. Review the configuration recorder settings and click Next.
  5. Review the rules and click Next.
  6. Review the summary and click Create configuration recorder.

AWS Config will start monitoring your resources and will notify you when a rule is triggered. This can help you identify idle resources automatically, without having to manually review your account.

Step-by-Step: Involve Your Team

Decluttering your AWS account is not a one-person job. It is important to involve your team so that everyone is aware of the changes and can help maintain a clean account.

  1. Communicate the importance of decluttering to your team.
  2. 2. Assign responsibilities for reviewing different services.

  3. Share the documentation you create.
  4. Hold regular meetings to discuss progress and any issues.

By involving your team, you can ensure that your AWS account remains clean and efficient over time.

Step-by-Step: Consider Using AWS Organizations

If you have multiple AWS accounts, consider using AWS Organizations. It provides a centralized way to manage your accounts and can help you enforce policies across all accounts.

  1. Open the AWS Organizations console and click Create an organization.
  2. 2. Follow the prompts to create the organization.

  3. Add your existing accounts to the organization.
  4. Create service control policies (SCPs) to restrict access to certain services.
  5. Use consolidated billing to get a single bill for all accounts.

AWS Organizations can help you reduce costs by preventing the creation of unnecessary services. It also provides better visibility into your overall AWS usage.

Step-by-Step: Learn from Common Mistakes

When decluttering your AWS account, it is easy to make mistakes. Here are some common mistakes to avoid:

  • Deleting resources without backing up: Always back up your data before you delete any resource.
  • Removing IAM roles without checking dependencies: IAM roles cannot be deleted if they are still attached to a resource.
  • Shutting down production instances: Always verify that an instance is not production before you shut it down.
  • Ignoring cost anomalies: Pay attention to sudden spikes in cost and investigate them immediately.
  • Not documenting changes: Document your changes so you can track what you have done and why.

Avoiding these mistakes will help you declutter your AWS account safely and effectively.

Step-by-Step: Use the Right Tools for the Job

There are many tools available to help you declutter your AWS account. Some tools are built into the AWS console, while others are third-party.

  • AWS Cost Explorer: Helps you analyze your spending and identify areas where you can save money.
  • AWS Trusted Advisor: Provides recommendations on how to optimize your AWS environment.
  • CloudWatch Alarms: Helps you monitor your resources and get notified when something goes wrong.
  • CloudFormation: Helps you manage your infrastructure as code.
  • Terraform: An open-source tool that helps you manage your infrastructure as code.

Using the right tools can make the decluttering process much easier and more efficient.

Step-by-Step: Stay Updated on AWS Changes

AWS is constantly changing. New services are released, and existing services are updated. It is important to stay updated on these changes so you can make informed decisions about your AWS environment.

  • Subscribe to the AWS Blog: The AWS Blog provides news and updates on all things AWS.
  • Follow AWS on social media: Twitter and LinkedIn are good places to find news and updates.
  • Attend AWS events: AWS re:Invent is the largest AWS conference, but there are also many local events.
  • Read AWS documentation: The AWS documentation is constantly being updated and provides the latest information on all AWS services.

Staying updated on AWS changes will help you make better decisions about your AWS environment and keep your account clean and efficient.

Step-by-Step: Plan for the Future

Decluttering is not a one-time event. It is an ongoing process. As your application evolves, you will need to update your inventory and remove any services that are no longer needed.

Related

General information for everyday wellbeing, not medical advice. If something affects your health, sleep or mood for more than a short while, talk to a qualified professional. Read more

Spotted an error? Tell us and we will correct it (corrections policy).