Description
For an unattached EBS volume, confirm its owner, purpose, and retention period.
Potential impact
A detached volume retains its data and continues to incur storage charges.
Remediation
If the volume is needed by an application, attach it to the intended instance in the same Availability Zone. Keep volumes reserved for backup or retention until the approved disposal criteria are met.
Examples
Define AppInstance in us-west-1a, the same Availability Zone as DataVolume.
Before
yaml
Resources:
DataVolume:
Type: AWS::EC2::Volume
Properties:
Size: 100
AvailabilityZone: us-west-1a
After
yaml
Resources:
DataVolume:
Type: AWS::EC2::Volume
Properties:
Size: 100
AvailabilityZone: us-west-1a
DataVolumeAttachment:
Type: AWS::EC2::VolumeAttachment
Properties:
InstanceId: !Ref AppInstance
VolumeId: !Ref DataVolume
Device: /dev/sdh