Search code examples
node.jsamazon-web-servicesaws-sdkamazon-connect

Amazon Connect in "CREATION_FAILED" status after successful call to .createInstance() from NodeJS aws-sdk


When I run the following code from a Lambda Function:

await connect.createInstance({
     InstanceAlias: 'my-connect-instance', 
     IdentityManagementType: 'CONNECT_MANAGED', 
     InboundCallsEnabled: true, 
     OutboundCallsEnabled: true}).promise();

I get back a response that looks like this:

{
    "Id": "fx5c4558-****-4742-n365-f817e7018752",
    "Arn": "arn:aws:connect:us-east-1:***********:instance/fx5c4558-****-4742-n365-f817e7018752"
}

So it seems like it has succeeded. However, when I open up the AWS Console and check the Connect dashboard, I see this:

Instance Alias | Access Url | Channels     | Create Date | Status
-------------------------------------------------------------------------
Unknown        |            | No telephony | Unknown     | Create error

And if I run await connect.listInstances().promise() then I get back the following response:

{
    "InstanceSummaryList": [
        {
            "Id": "fx5c4558-****-4742-n365-f817e7018752",
            "Arn": "arn:aws:connect:us-east-1:************:instance/fx5c4558-****-4742-n365-f817e7018752",
            "IdentityManagementType": null,
            "InstanceAlias": null,
            "CreatedTime": null,
            "ServiceRole": null,
            "InstanceStatus": "CREATION_FAILED",
            "InboundCallsEnabled": null,
            "OutboundCallsEnabled": null
        }
    ]
}

What I've tried so far:

  • deleted all previous instances, including instances that failed to be created
  • tried using a different value for instance-alias
  • tried leaving out optional values from the params (InstanceAlias)
  • tried the same api call in a different region (us-west-2)

If anyone has experience with the AWS SDK for NodeJS in relation to Amazon Connect and can see that I have done something incorrect or has any idea why the Connect instances are failing to be created, I would be extremely grateful if you could share help me resolve this.


Solution

  • Just learned that this feature is in preview mode and if you update the aws-sdk version to v2.801, then the request works.

    https://github.com/aws/aws-sdk-js/issues/3557