Profile Applicability:
- Level 2
Description:
Amazon FSx provides fully managed shared file systems with support for Windows File Server and Lustre. Cleaning up FSx resources is crucial for cost optimization and security. This process ensures that unused or unnecessary FSx file systems, storage, and associated resources are properly deleted, avoiding unnecessary charges and resource consumption.
Rationale:
Cleaning up FSx resources ensures:
Avoidance of unnecessary costs for unused or idle file systems
Proper removal of sensitive data from storage systems
Efficient resource management in your AWS environment
Compliance with organizational and security standards
Default Value:
FSx resources are not automatically deleted after usage, and can incur ongoing costs unless manually cleaned up.
Impact:
Pros:
• Reduces unnecessary storage costs for inactive or unused file systems
• Improves security by removing unneeded resources and data
• Helps maintain a cleaner AWS environment with fewer unused resources
Cons:
• Misconfiguration may lead to accidental deletion of required data
• Requires manual monitoring and management to ensure clean-up is performed regularly
• Data recovery can be difficult if backups are not properly configured
Pre-requisites:
IAM Permissions Required:
fsx:DeleteFileSystem, fsx:DescribeFileSystems, fsx:DeleteBackup, ec2:DescribeVolumes
Administrator or delegated permissions to delete FSx resources
Remediation:
Test Plan:
Using AWS Console:
• Log in to the AWS Management Console
• Navigate to FSx > File systems
• Identify unused or unnecessary file systems that can be cleaned up
• Review the storage capacity, backups, and associated resources
• Click on Delete for file systems that are no longer required
• Confirm successful deletion in the FSx Dashboard
Using AWS CLI:
aws fsx describe-file-systems aws fsx describe-backups aws fsx delete-file-system \ --file-system-id fs-xxxxxxxxxxxxxxxxx
Implementation Plan:
Using AWS Console:
• Navigate to FSx > File systems
• Select the file system you wish to delete
• Click Delete and follow the prompts to confirm
• Optionally, delete any associated backups or volumes
• Review the FSx Dashboard to confirm resource deletion
Using AWS CLI:
Step 1: List all file systems
aws fsx describe-file-systems
Step 2: Delete an unused FSx file system
aws fsx delete-file-system \ --file-system-id fs-xxxxxxxxxxxxxxxxx
Step 3: Delete associated backup if necessary
aws fsx delete-backup \ --backup-id backup-xxxxxxxxxxxxxxxxx
Step 4: Clean up any associated storage volumes (if applicable)
aws ec2 describe-volumes \ --filters "Name=tag:Name,Values=FSx-Volume"
Backout Plan:
Using AWS Console:
• If the wrong FSx resource is deleted, restore it from backup (if available)
• Recreate the FSx resource and reconfigure settings as required
• Manually reattach any previously associated volumes or resources
Using AWS CLI:
aws fsx create-file-system \ --file-system-type WINDOWS \ --storage-capacity 300 \ --subnet-id subnet-xxxxxxxxxx
aws fsx restore-file-system-from-backup \ --backup-id backup-xxxxxxxxxxxxxxxxx
References:
- https://docs.aws.amazon.com/fsx/latest/WindowsGuide/what-is.html
- https://docs.aws.amazon.com/cli/latest/reference/fsx/delete-file-system.html
- https://aws.amazon.com/fsx/