Reputation: 7440
One of my CloudFormation stacks is stuck in a UPDATE_COMPLETE_CLEANUP_IN_PROGRESS
because I attempted to remove a subnet that was no longer needed. However, this subnet apparently has some resources attached to it, including an EC2 instance and a VPC Endpoint. I cannot delete this VPC Endpoint in AWS. When I attempt to delete the VPC Endpoint, I receive this error message:
How do I find out what dependencies this VPC Endpoint has and go about deleting it?
From what I can Google, Operation is not allowed for requester-managed VPC endpoints for the service
means that AWS created this VPC endpoint for me, as part of a request for some resource. However, I have no idea which resource this VPC endpoint is tied to.
Update: the VPC Endpoint uses an ENI, but when I try to delete/detach this ENI, it says that the ENI is being used by a service and therefore cannot be deleted.
Upvotes: 7
Views: 12136
Reputation: 69
Try to use this command to get error info.
aws ec2 delete-vpc-endpoints --vpc-endpoint-ids <endpointID> --profile <YourProfile>
In my case, I created a redis service that is the elasticache serverless it's running so I can't remove VPC-Endpoints. This is the logs I got from aws-cli:
{
"Unsuccessful": [
{
"Error": {
"Code": "InvalidParameter",
"Message": "Operation is not allowed for requester-managed VPC endpoints for the service com.amazonaws.elasticache.serverless.us-east-1.vpce-svc-xxxxxxx."
},
"ResourceId": "vpce-xxxxxxx"
}
]
}
Upvotes: 0
Reputation: 1461
Don't you have RDS Proxy? It creates VPC Endpoint on behalf of customer.
Upvotes: 9
Reputation: 9605
As it is a requester managed VPC endpoint.
Requester-managed network interfaces
You cannot modify or detach a requester-managed network interface. If you delete the resource that the network interface represents, the AWS service detaches and deletes the network interface for you. To change the security groups for a requester-managed network interface, you might have to use the console or command line tools for that service.
You need to delete the resource which has created this vpc endpoint.
Upvotes: 2