Go to the Amazon S3 console and find the bucket that was created by your AWS CloudFormation stack. In the illustration below, the name of the bucket is
Click the bucket name, create a virtual folder called
connect and go to that folder.
Click the Upload button and select one of your call recordings you have downloaded earlier to your laptop. In the illustration below, the file is called
This time, click the Next button to continue, because we have to add meta-data to our upload that the processing pipeline assumes to be present. Previously, we directly clicked the Upload button at this stage.
In the Set permissions form we leave everything as is and click the Next button.
In the Set properties form we need to do our work. Leave the Storage class section untouched, though.
Scroll down to view the Metadata section. Click the drop down box named Header. We will use this to add an HTTP header to our upload request with the required meta data.
x-amz-meta- header prefix. Now click into the field and type
contact-id such that you get the resulting header name
Enter an arbitrary value for this header in the Value field and click the
Save button. In the illustration below, we use the value
foobar. Click the Next button.
In the review form we see a summary of what we entered before. Click the Upload button to upload our recording with the provided meta information.
Once the upload has succeeded, let’s pay a visit to the AWS Step Functions console. The first step in the pipeline is to split the audio file in two, one for each stero channel. However, this will already have happened very quickly and the state machine we have created in AWS Step Functions will already be triggered. In the AWS Step Functions console you will see an overview of your state machines, as long as you didn’t create one otherwise, you will only see the one created from the AWS CloudFormation stack. Click on the name of that state machine to get to the details view.
This will bring you to the details view of your state machine.
Scroll down to see an overview of past and current executions in the Executions tab. You should see two running executions, one for each of the two split audio files.
Click the Definition tab to view the formal definition of your state machine. In the left half of this view you can see the textual definition using the Amazon States Language. This language is explained and you can find examples in the AWS Step Functions documentation. In the right half you see the same state machine visualized as a graph, which makes it quite tangible also for non-computer-scientists. You can even create a state machine interactively by drawing such a graph. Take a moment to explore the definition of the state machine.
Go back to the Executions tab and click on the name of one of the running executions. You will get to the details view of this particular execution.
Scrolling down a bit, you will see the visual workflow, showing you which steps have already been executed and which step is currently running. Take a moment to explore the details of your workflow execution.
Now that we have explored the AWS Step Functions console a bit, let’s go to the AWS Lambda console. On the first screen you will see a list of the Lambda functions in your account and currently selected AWS region. Let’s go a bit more in detail and pick one of the functions that are orchestrated by the state machine we have just observed. Click on the name of the Lambda function submit_transcribe_job.
This brings you to the details view of said Lambda function. On the right hand side you can see what other AWS services this Lambda function is entitled to access.
Scroll down a bit to see the code of this Lambda function. It’s written in Python. The code is presented in an embedded view of the AWS Cloud9 cloud IDE. Find the full size button in the top right corner of that view (marked with an orange circle in the illustration below) to get to a full size view of Cloud9.
Finally, go to the Amazon S3 bucket that has been created by your AWS CloudFormation stack. That’s the one you already used to upload your call recording to in the beginning of this section. Find and click the virtual directory called
comprehend. You will find two S3 objects per call recording, one with the results of the agent channel, one with the results of the customer channel. The names of the objects will also expose the
contact-id that was specified during your upload (and will automatically be included by Amazon Connect), in the illustration below, the conctact ID is
The results coming out of Amazon Comprehend are in JSON format. Download one or a few of these JSON documents to your laptop and explore the content. What can you see there?