Remove EC2 Instance Connect Endpoint - Amazon Elastic Compute Cloud

Remove EC2 Instance Connect Endpoint

To remove EC2 Instance Connect Endpoint from your VPC, delete the endpoint that was created in a subnet.

When you delete an EC2 Instance Connect Endpoint, it first enters the Deleting (console) or delete-in-progress (AWS CLI) state, and then the delete-complete (AWS CLI) state. In the console, a deleted endpoint no longer appears. If the delete action fails, the state is delete-failed, and the Status message (console) or StateMessage (AWS CLI) provides the failure reason.

Use one of the following methods to delete an EC2 Instance Connect Endpoint.

Console
To delete an EC2 Instance Connect Endpoint
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the left navigation pane, choose Endpoints.

  3. Select the endpoint.

  4. Choose Actions, Delete VPC endpoints.

  5. When prompted for confirmation, enter delete.

  6. Choose Delete.

AWS CLI
To delete an EC2 Instance Connect Endpoint

Use the delete-instance-connect-endpoints AWS CLI command and specify the ID of the EC2 Instance Connect Endpoint to delete.

aws ec2 delete-instance-connect-endpoint --instance-connect-endpoint-id eice-03f5e49b83924bbc7

Example output

{ "InstanceConnectEndpoint": { "OwnerId": "111111111111", "InstanceConnectEndpointId": "eice-0123456789example", "InstanceConnectEndpointArn": "arn:aws:ec2:us-east-1:111111111111:instance-connect-endpoint/eice-0123456789example", "State": "delete-in-progress", "StateMessage": "", "NetworkInterfaceIds": [], "VpcId": "vpc-0123abcd", "AvailabilityZone": "us-east-1d", "CreatedAt": "2023-02-07T12:05:37+00:00", "SubnetId": "subnet-0123abcd" } }