How to resolve the 'Failed to delete DataIntegration' error when deleting Amazon Q for Connect data integrations ?

4 minute read
Content level: Intermediate
2

When attempting to delete Amazon Q data integrations in Connect, users may encounter the error "Failed to delete DataIntegration with name: <>. An DataIntegration with DataIntegrationAssociations cannot be deleted." This article provides a step-by-step resolution using commands to run in AWS CLI or AWS CloudShell, as the Amazon Connect service currently doesn't provide console mechanisms to view or delete existing data integrations.

Root Causes

The "Failed to delete DataIntegration" error typically occurs due to two main reasons:

  1. The data integration is actively associated with an Amazon Q domain in your Connect instance.
  2. There are underlying or hidden association records that must be removed first.

Prerequisites

  • AWS CLI version 2.3 (or higher) installed locally, or access to AWS CloudShell.
  • AWS credentials and the region configured in your environment.
  • Appropriate IAM permissions to manage Connect and Q in Connect (Wisdom) resources.

Resolution Steps

  1. List Existing Data Integrations

To view all the existing data integrations , run the following command :

aws appintegrations list-data-integrations
  1. Check Data Integration Associations

To view asociations for the target data integration , run :

aws appintegrations list-data-integration-associations --data-integration-identifier <DATA_INTEGRATION_NAME>

If you cannot find any data integration associations with your data integration, move to the next step in order to ensure there are no other associations existing with the Connect instance or in Q for Connect.

  1. Review Connect Instance Integrations

To list all the integrations associated with your Connect instance , run :

aws connect list-integration-associations --instance-id <CONNECT_INSTANCE_ID>

Note down:

  • IntegrationAssociationId for "WISDOM_KNOWLEDGE_BASE" type
  • IntegrationArn for "WISDOM_ASSISTANT" type
  1. Delete Knowledge Base Integration

If WISDOM_KNOWLEDGE_BASE exists, run :

aws connect delete-integration-association --instance-id <CONNECT_INSTANCE_ID> --integration-association-id <WISDOM_KNOWLEDGE_BASE_IntegrationAssociationId>
  1. Manage QConnect Assistant Associations

List the assistant associations for the "WISDOM_ASSISTANT" :

aws qconnect list-assistant-associations --assistant-id <WISDOM_ASSISTANT_ID>

Note: Only input the id from the IntegrationARN value retrieved in step 3.

  1. Clean Up any existing Assistant Associations

Delete any found associations :

aws qconnect delete-assistant-association --assistant-id <assistantId> --assistant-association-id <assistantAssociationId>
  1. Handle Knowledge Base Resources

List existing qconnect knowledge bases :

 aws qconnect list-knowledge-bases
  1. Delete Related Knowledge Base

Remove any knowledge base associated with your data integration :

aws qconnect delete-knowledge-base --knowledge-base-id <KNOWLEDGE_BASE_ID>
  1. Verify Association Removal

Confirm data integration associations are removed :

aws appintegrations list-data-integration-associations --data-integration-identifier <DATA_INTEGRATION_NAME>
  1. Delete Data Integration

Finally, delete the data integration :

aws appintegrations delete-data-integration --data-integration-identifier  <DATA_INTEGRATION_NAME>

Verification

After completing these steps, verify in the Amazon Connect console that the data integration has been successfully removed.

Important Notes

  • Amazon Q in Connect Knowledge bases have a hard limit of 10 per region.
  • 'Data integrations per region' quota can be increased from the default value of 10 through Service Quotas console. It is possible to receive auto-approval for an increase request of upto 25.
  • As a best practice, ensure to back up or document the configurations and settings before deletion.
  • The provided CLI commands can also be run directly in AWS CloudShell within the AWS Management Console, provided the IAM role/user has the necessary permissions required to access it.

Related Documentation