- Newest
- Most votes
- Most comments
To resolve the issue of deleting the stuck Volume and ENI in AWS, you can try the following steps:
Detach the Volume: Use the AWS CLI to detach the volume from the non-existent ECS task
aws ec2 detach-volume --volume-id vol-052db481725ad28e3
Delete the ENI: Since the ENI is likely still attached to the ECS task, you can try to detach it first and then delete it.
aws ec2 detach-network-interface --attachment-id eni-attach-id
aws ec2 delete-network-interface --network-interface-id eni-01c1baa5dc154e20c
If the attachment ID is not known, you can describe the network interface to get it:
aws ec2 describe-network-interfaces --network-interface-ids eni-01c1baa5dc154e20c
Force Delete the Volume: If the volume is still marked as in-use, you might need to force delete it after detaching it.
aws ec2 delete-volume --volume-id vol-052db481725ad28e3
Check and Clean Up Resources: Ensure there are no lingering dependencies or attachments to the Volume or ENI.
Verify Resource Deletion: After performing the above steps, confirm that the Volume and ENI are no longer present.
aws ec2 describe-volumes --volume-ids vol-052db481725ad28e3
aws ec2 describe-network-interfaces --network-interface-ids eni-01c1baa5dc154e20c
If the resources are still stuck, consider reaching out to AWS Support for assistance in cleaning up the stuck resources.
Relevant content
- asked 5 months ago
- asked 7 months ago
- asked a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
