1 回答
- 最新
- 投票最多
- 评论最多
0
Hello.
I think you need to delete the resource that is using the network interface.
For example, typical resources include ALB, Lambda connected to VPC, and EC2.
First you need to find the resource that uses ENI.
If you look at the ENI description column, there may be hints written there.
I think it will be easier to see if you run the following command with CloudShell etc.
SUBNETID=subnet-yyyyyyyyyy
aws ec2 describe-network-interfaces\
--filters Name=subnet-id,Values="$SUBNETID"\
--query 'NetworkInterfaces[].{
PrivateIpAddress:PrivateIpAddress,
PublicIp:Association.PublicIp
Name:TagSet[?Key==`Name`]|[0].Value,
Description:Description,
InstanceId:Attachment.InstanceId,
NetworkInterfaceId:NetworkInterfaceId,
Status:Status
}'\
--output json\
| jq -r '
.[] | [.PrivateIpAddress, .PublicIp, .Description, .Name, .InstanceId, .NetworkInterfaceId, .Status] | @csv'\
| sort -V -t "," -k 1
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 8 个月前
I did check all the related resources and did try to delete them, as I mentioned in the post. Nothing helped.
By the way, which resource is the ENI linked to that cannot be deleted?