Automating processes is a cornerstone of cloud computing. If you have data processing that needs to happen on data once it is uploaded to the cloud, there is no reason not to automate it to save yourself extra work for every new file. With AWS, this automation is easy to achieve. In this lab, we’ll transcribe audio data into text whenever an audio file is uploaded to S3. Magic!
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create an IAM Role
- Log in to the AWS Console.
- Create an IAM role that will allow Lambda to:
- Read and write to S3
- Start jobs in Transcribe
- Create logs in CloudWatch
- Create a Lambda Function
- Create a new Lambda function that will handle events from S3. Be sure to use the IAM role you just created.
- Each event should create a new job in Transcribe that will translate the audio to text and store the result back in the S3 bucket that triggered the event.
- Hint: Transcribe jobs must be uniquely named.
- Output the name of the Transcribe job to CloudWatch.
- Create an S3 Bucket
- Create a new S3 bucket to hold the meeting audio.
- Since the audio will contain secret company information, ensure the bucket can’t be accessed by anyone outside the company.
- The meeting audio should be encrypted at rest to improve security.
- Create an event notification for uploaded audio files that will trigger your Lambda function.
- Hint: It’s very important to only send audio data to your function since we’ll be automatically adding text data back to this bucket via the Transcribe job. You don’t want an infinite loop of Lambda calls.
- Create a new S3 bucket to hold the meeting audio.
- Automatically Transcribe Data
- Upload the
ImportantBusiness.mp3
audio file provided with the lab (direct link) to the S3 bucket. - View the logs for the Lambda function in CloudWatch.
- View the details of the job created in Transcribe.
- Attempt to view the transcript in a browser via the S3 URL.
- Download the transcript to view the results.
- Upload the