How much of Amazon Connect is scriptable, either through Terraform, Ansible or another approach?
Asked Answered
A

3

5

This question concerns AWS Connect, the cloud-based call center. For those people who have been involved in the setup and configuration of AWS Connect, is there any portion of Amazon Connect that is configurable through a continuous integration flow other than any possible Lambda touchpoints. What I am looking for is scripting various functions such as loading exported flows, etc.

Looking at the AWS CLI, I see a number of AWS Connect calls but a majority is getting access to information (https://docs.aws.amazon.com/cli/latest/reference/connect/index.html) but very few that are available to configure portions of AWS Connect.

Aristides answered 25/2, 2020 at 16:24 Comment(2)
It doesn't look like AWS exposes much in the way of things you can do via the API for Connect as you can see in the API docs. Terraform could, in theory, be used to manage the users but there's not a resource currently there, presumably because of the lack of other APIs around Connect.Mcneese
Yes, I saw that also. I was hoping that someone who had done an AWS Connect implementation could shed light on what they did, if anything, around the CI/CD.Aristides
T
3

There is basically nothing at this time. All contact flows must be imported/exported by hand. Other settings (e.g. routing profiles, prompts, etc.) must be re-created manually.

Someone has created a "beta" Connect CloudFormation template though that actually uses puppeteer behind the scenes to automate the import/export process. I imagine that Amazon will eventually support this, because devops is certainly one of the rough edges of the platform right now.

Tangier answered 19/6, 2020 at 5:23 Comment(1)
Thanks for the head's up. I did take a look at the site you linked but unfortunately, my client will not approve such a "beta" approach.Aristides
S
2

For new people checking this question. Amazon has recently published the APIs you are looking for. create-contact-flow

It uses a JSON-based language specific to Amazon Connect, below is an example:

{
"Version": "2019-10-30",
"StartAction": "12345678-1234-1234-1234-123456789012",
"Metadata": {
    "EntryPointPosition": {"X": 88,"Y": 100},
    "ActionMetadata": {
        "12345678-1234-1234-1234-123456789012": {
            "Position": {"X": 270, "Y": 98}
        },
        "abcdef-abcd-abcd-abcd-abcdefghijkl": {
            "Position": {"X": 545, "Y": 92}
        }

    }
},
"Actions": [
    {
        "Identifier": "12345678-1234-1234-1234-123456789012",
        "Type": "MessageParticipant",
        "Transitions": {
            "NextAction": "abcdef-abcd-abcd-abcd-abcdefghijkl",
            "Errors": [],
            "Conditions": []
        },
        "Parameters": {
            "Prompt": {
                "Text": "Thanks for calling the sample flow!",
                "TextType": "text",
                "PromptId": null
            }
        }
    },
    {
        "Identifier": "abcdef-abcd-abcd-abcd-abcdefghijkl",
        "Type": "DisconnectParticipant",
        "Transitions": {},
        "Parameters": {}
    }
]
}

Exporting from the GUI does not produce a JSON in this format. Obviously, a problem with this is keeping a state. I am keeping a close eye on Terraform/CloudFormation/CDK and will update this post if there is any support (that does not use puppeteer).

Slicer answered 7/10, 2020 at 19:13 Comment(2)
Just be aware that the contact flow in the json based language is a json object within the json object returned from the DescribeContactFlow API call. This means it's escaped. Also to restore a contact flow you will need more than just the contact flow itself you will need to provide other AWS Connect metadata too.Fascicule
True that the Contact Flow will require some work but i think the contact flows are the least issue. this could be resolved by writing a parser and producer script and just using the git ops approach you can be able to integrate it into a CI/CD. at the moment i just opened an issue for Terraform to add the resources if i got the time i may work on it. github.com/hashicorp/terraform-provider-aws/issues/16392Booster
B
1

I think it's doable now; with the newest APIs, you can do many things to script the entire process. There are some issues with the contact flows themself, but I think this will improve over the next few months.

In the meantime, there is some effort to add Amazon Connet to Terraform. here are the issues and the WIP PRs

Booster answered 11/12, 2020 at 21:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.