Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Delete an EC2 Instance Connect Endpoint
When you are finished with an EC2 Instance Connect Endpoint, you can delete it.
You must have the required IAM permissions to create an EC2 Instance Connect Endpoint. For more
information, see Permissions to create, describe,
and delete EC2 Instance Connect Endpoints.
When you delete an EC2 Instance Connect Endpoint using the console, it enters the
Deleting state. If deletion is successful, the deleted endpoint
no longer appears. If deletion fails, the state is delete-failed
and
Status message provides the failure reason.
When you delete an EC2 Instance Connect Endpoint using the Amazon CLI, it enters the
delete-in-progress
state. If deletion is successful, it enters the
delete-complete
state. If deletion fails, the state is
delete-failed
and StateMessage
provides the failure
reason.
- Console
-
To delete an EC2 Instance Connect Endpoint
Open the Amazon VPC console at
https://console.amazonaws.cn/vpc/.
-
In the left navigation pane, choose
Endpoints.
-
Select the endpoint.
-
Choose Actions, Delete VPC
endpoints.
-
When prompted for confirmation, enter
delete
.
-
Choose Delete.
- Amazon CLI
-
To delete an EC2 Instance Connect Endpoint
Use the delete-instance-connect-endpoint Amazon 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
The following is 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
"
}
}