The Amazon Connect admin portal does not have a simple delete option for some of its objects, such as Contact flows, hours of operation, Modules and more. Recently they did add the option to delete Quick Connects, so we may see more delete options in the future updates, but for now we are stuck with CloudShell or PowerShell to delete these objects.
TIP: if you dont want to delete flows and such all the time, its common to rename the objects to something with ZZ_ infront, e.g. ZZ_myoldflow, this will put it low on the list and it can then be reused when you need to create a new one.
The commands can be run both from CloudShell within AWS or from PowerShell once you have connected to AWS.
To open the CloudShell in AWS, login to your AWS console and connect to the instance you need to delete from and open CloudShell from the top right corner:
The command we need to use goes like this:
aws connect "Synopsis" --instance-id "instance-id" --contact-flow-id "contact-flow-id"
e.g. like this: aws connect delete-contact-flow –instance-id a011d1c1-11d1-1bac-be1a-1bd1f1ab111e –contact-flow-id d1a11111-a11c-111e-111c-111111fe1c11
To find your Instance ID (AWS documentation), go to your AWS portal, enter (or search for) Amazon Connect
Click the instance alias you want to enter and under Distribution settings you will find Instance ARN the last part of that is the Instance ID
Now to find the Contact Flow ID (AWS documentation), go to your Amazon Connect portal, find and open the flow you want to delete.
In the left side menu, at the bottom, you will see “Show additional flow information” open that and again you will see an ARN string, where the last part after /contact-flow/…… is the Contact Flow ID.
Now all that’s left is to run the full command with the instance ID and flow ID added.
Running the command will not give you any feedback, but once it’s run you can go back into Amazon Connect, to verify that the flow is gone.
Other synopsis to use like delete-contact-flow is: delete-contact-flow-module and delete-hours-of-operation