Amazon Connect Contact Flow to Lambda Function JSON Request Sample

Tadashi Shigeoka ·  Thu, August 20, 2020

I’ll introduce a sample JSON request from Amazon Connect contact flow to Lambda function.

AWS

Background: Want to Use for Lambda Test Events

AWS Lambda allows you to set JSON from “Configure test event,” so I looked for sample JSON request code to verify the operation of Lambda functions called from Amazon Connect contact flows.

Amazon Connect → Lambda Function JSON Request Sample

{
    "Details": {
        "ContactData": {
            "Attributes": {},
            "Channel": "VOICE",
            "ContactId": "4a573372-1f28-4e26-b97b-XXXXXXXXXXX",
            "CustomerEndpoint": {
                "Address": "+1234567890",
                "Type": "TELEPHONE_NUMBER"
            },
            "InitialContactId": "4a573372-1f28-4e26-b97b-XXXXXXXXXXX",
            "InitiationMethod": "INBOUND | OUTBOUND | TRANSFER | CALLBACK",
            "InstanceARN": "arn:aws:connect:aws-region:1234567890:instance/c8c0e68d-2200-4265-82c0-XXXXXXXXXX",
            "PreviousContactId": "4a573372-1f28-4e26-b97b-XXXXXXXXXXX",
            "Queue": "QueueName",
            "SystemEndpoint": {
                "Address": "+1234567890",
                "Type": "TELEPHONE_NUMBER"
            }
        },
        "Parameters": {
            "sentAttributeKey": "sentAttributeValue"
        }
    },
    "Name": "ContactFlowEvent"
}

I want to use the JSON request sample for test events from Amazon Connect contact flow to Lambda function. That’s all from the Gemba.