Coordinating AI Services with Step Functions

45 minutes
  • 4 Learning Objectives

About this Hands-on Lab

The individual machine learning services provided by AWS are incredibly powerful by themselves, but when used together, they are extraordinary. Chaining the services together can create truly magical experiences. However, the outputs and inputs of each of these services need to be coordinated because each service takes a varying amount of time based on the original input data. Step Functions are one way to keep track of all of these moving pieces.

In this lab, you will be modifying an existing pipeline to learn how to set up the coordination between the services. We will be using Lambda functions in the background to run the logic of our pipeline, but all of the Lambda functions are provided for you.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Add Translation to the Pipeline

Modify the Polyglot-Pipeline to include Translation utilizing the existing Lambda functions on the account.

Add Sentiment Analysis to the Pipeline

Modify the Polyglot-Pipeline to include Sentiment Analysis utilizing the existing Lambda functions on the account.

Convert the Translated Text to Audio

Modify the Polyglot-Pipeline to convert the translated text to audio utilizing the existing Lambda functions on the account.

Upload Audio and Test the Pipeline

Upload the audio files provided in Github to S3 and observe the results.

Additional Resources

Scenario

Our company creates short audio clips of interesting information for sharing on social media. While we try to keep our content positive, some of what we provide is news about something bad happening. Recently, we have been receiving requests to provide our content in Spanish to serve a broader audience. While we are in the process of hiring Spanish speakers, we can take advantage of machine learning to translate our back catalog of content.

We are already using Transcribe to convert our audio files to text and managing the pipeline with Step Functions. Our goal is to update the pipeline to convert the audio transcripts into Spanish, and then have the translated text converted back to audio to be ready to share. Additionally, our development team has asked us to determine if each audio clip contains something negative, so that a warning can be placed on the content.

Resources

The development team has provided all of the business logic code you will need as Lambda functions. An input S3 bucket is set up to automatically process mp3 audio files uploaded to the bucket using the existing Step Functions pipeline. An output bucket is provided to hold the finished audio files.

Example audio files are provided for you on GitHub.

Lab Goals

  1. Add Translation to the Pipeline
  2. Add Sentiment Analysis to the Pipeline
  3. Convert the Translated Text to Audio
  4. Upload Audio and Watch the Magic

Logging in to the Lab Environment

To avoid issues with the lab, use a new Incognito or Private browser window to log in to the lab. This ensures that your personal account credentials, which may be active in your main window, are not used for the lab.

Log in to the AWS console using the account credentials provided with the lab. Please make sure you are in the us-east-1 (N. Virginia) region when in the AWS console.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?