Step 7: (Optional) Clean up
If you want to delete the resources that you have created in this tutorial, follow these procedures.
To remove your VPC endpoint for Amazon Keyspaces
-
Log in to your Amazon EC2 instance.
-
Determine the VPC endpoint ID that is used for Amazon Keyspaces. If you omit the
grep
parameters, VPC endpoint information is shown for all services.aws ec2 describe-vpc-endpoint-services | grep ServiceName | grep cassandra
{ "VpcEndpoint": { "PolicyDocument": "{\"Version\":\"2008-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"*\",\"Resource\":\"*\"}]}", "VpcId": "vpc-0bbc736e", "State": "available", "ServiceName": "com.amazonaws.us-east-1.cassandra", "RouteTableIds": [], "VpcEndpointId": "vpce-9b15e2f2", "CreationTimestamp": "2017-07-26T22:00:14Z" } }In the example output, the VPC endpoint ID is
vpce-9b15e2f2
. -
Delete the VPC endpoint.
aws ec2 delete-vpc-endpoints --vpc-endpoint-ids vpce-9b15e2f2
{ "Unsuccessful": [] }The empty array
[]
indicates success (there were no unsuccessful requests).
To terminate your Amazon EC2 instance
Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/
. -
In the navigation pane, choose Instances.
-
Choose your Amazon EC2 instance.
-
Choose Actions, choose Instance State, and then choose Terminate.
-
In the confirmation window, choose Yes, Terminate.