- Newest
- Most votes
- Most comments
Unfortunately, nothing build-in to accomplish the same. Think of this as a Non-repudiation security feature to provide visibility on what the account has been used for. There is no built-in way to accomplish this task. When using AWS services, you might change your account configuration and/or create various resources like IAM roles or CloudWatch log groups. Additionally, you might change global or regional service configurations (e.g. for AWS Config or Amazon API Gateway). Further more, while using the services, your account's internal metrics will change. So basically, there is no way to do a 'factory reset' of an AWS account.
Even when you deploy your resources using the IaC approach (AWS CloudFormation or AWS CDK) and then delete the stacks, you still might have some data or configuration that differs from defaults (e.g. CloudWatch metrics - you cannot delete them, they expire automatically).
The only way to fully reset everything is to delete your existing account and create a new one.
Open-source tools may serve your purpose. Such as AWS-Nuke or Cloud-Nuke. However, please use it at your own risk. Warning: these open source tools are not provided by AWS. You should take every precaution to ensure that nothing critical gets deleted, and you are responsible for your choices and actions.
If you are on a learning path best thing to do is setup a seperate new account. or use aws skillbuilder which provides sandbox environment which will allow you to experiment freely.
Detailed advice on terminating resources you don't need any more is here https://repost.aws/knowledge-center/terminate-resources-account-closure
A drastic option if you want to terminate all running resources in your account is AWS Nuke (caution: use with care!) https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automate-deletion-of-aws-resources-by-using-aws-nuke.html
Relevant content
- asked 3 years ago
- asked 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago