Manual Run

  1. 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 048fab...-connect. pipeline.manual-run.01.png

  2. Click the bucket name, create a virtual folder called connect and go to that folder. pipeline.manual-run.02.png

  3. 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 test1.wav.

    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.


  4. In the Set permissions form we leave everything as is and click the Next button. pipeline.manual-run.04.png

  5. In the Set properties form we need to do our work. Leave the Storage class section untouched, though. pipeline.manual-run.05.png

  6. 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. pipeline.manual-run.06.png

  7. Select the x-amz-meta- header prefix. Now click into the field and type contact-id such that you get the resulting header name x-amz-meta-contact-id. pipeline.manual-run.07.png

  8. 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. pipeline.manual-run.08.png

  9. 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. pipeline.manual-run.09.png

  10. 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. pipeline.manual-run.10.png

  11. This will bring you to the details view of your state machine. pipeline.manual-run.11.png

  12. 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. pipeline.manual-run.12.png

  13. 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. pipeline.manual-run.12a.png

  14. 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. pipeline.manual-run.13.png

  15. 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. pipeline.manual-run.14.png

  16. 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. pipeline.manual-run.15.png

  17. 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. pipeline.manual-run.16.png

  18. 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. pipeline.manual-run.17.png

  19. You can explore Cloud9 a bit in the full size view. AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair program and track each other’s inputs in real time. pipeline.manual-run.18.png

  20. 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 4711. 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? pipeline.manual-run.19.png