amazon-web-servicesamazon-vpc

Unable to delete AWS VPC Endpoint


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: enter image description here

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. enter image description here


Solution

  • 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.