Step 4: (Optional) Cleanup
Follow these steps to remove all the Amazon resources created in this tutorial. The Amazon Glue job stacks must be deleted before the parent infrastructure stack because they reference its exported values.
To remove the resources created in this tutorial
Delete the Amazon S3 bucket contents created by bootstrap. Replace
YOURACCOUNTIDwith your Amazon account ID.$aws s3 rm s3://amazon-keyspaces-bulk-cli-aksglue-YOURACCOUNTID--recursiveDelete the Amazon Glue job stacks created by the bootstrap command. These child stacks must be deleted before the parent stack. You can use the following commands.
$aws cloudformation delete-stack --stack-nameaksglue-export$aws cloudformation delete-stack --stack-nameaksglue-import$aws cloudformation delete-stack --stack-nameaksglue-countWait for the child stacks to finish deleting before proceeding. You can check the status with the following command.
$aws cloudformation wait stack-delete-complete --stack-nameaksglue-export$aws cloudformation wait stack-delete-complete --stack-nameaksglue-import$aws cloudformation wait stack-delete-complete --stack-nameaksglue-countDelete the parent Amazon CloudFormation stack. This removes the Amazon S3 bucket resource and the IAM role created in this tutorial.
$aws cloudformation delete-stack --stack-nameaksglueIf you created a trigger in the previous step, delete it using the following command.
$aws glue delete-trigger --nameKeyspacesExportWeeklyTriggerDelete the Amazon Keyspaces keyspace and table. Deleting the keyspace automatically deletes all tables in that keyspace. You can use one of the following options.