Support Documents
No data found.

How to build a Text-to-Speech serverless web application with Amazon Polly

Lab Details

  1. This lab walks you through creating a serverless web application hosted in S3 bucket which will take text input from the user and convert it to an audio file using Amazon Polly and store it in the S3 bucket. The user can list the audio file on the web page and play the file. You can also select a language to which the text needs to be converted.

  2. You will practice the lab using Amazon Polly, IAM, Lambda, SNS, API Gateway, DynamoDB, S3.

  3. Duration: 120 minutes

  4. AWS Region: US East (N. Virginia) us-east-1


What is Amazon Polly?

  1. Amazon Polly is a service that turns text into speech, allowing you to create applications that speak and build speech-enabled products.

  2. Amazon Polly is an Amazon AI service that uses advanced deep learning technologies to synthesize speech that sounds like a human voice. It currently includes 47 lifelike voices in 24 languages, so you can select the ideal voice and build speech-enabled applications that work in many different countries.

  3. You can also create a custom voice for your organization. This is a custom engagement where you will work with the Amazon Polly team to build an NTTS voice for the exclusive use of your organization.


  1. Natural sounding voices

  2. Store & redistribute speech

  3. Real-time streaming

  4. Customize & control speech output

Amazon API Gateway

  1. Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. 

  2. APIs act as the front door for applications to access data, business logic, or functionality from your backend services. 

  3. API Gateway handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, CORS support, authorization and access control, throttling, monitoring, and API version management. 

  4. Using API Gateway, you can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications. API Gateway supports containerized and serverless workloads, as well as web applications. 

  5. AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume.

  6. With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.


  1. Stands for Identity and Access Management.

  2. Web service that helps the user securely control access to AWS resources.

  3. Used to control who is authenticated and authorized to use AWS resources.

  4. The first "identity" is the creation of an account in the AWS portal.  On providing the email and password an Identity is created, and that's the "root user" holding all the permissions to access all resources in AWS.

  5. The primary resources in IAM are users, groups, roles, policies, and identity providers.

  6. IAM Group is a collection of IAM Users. You use groups to specify permissions for a collection of users, which can make those permissions easier to manage for those users.

  7. IAM roles are like IAM Users in that they are both identities with permission policies that determine what the owner can access.

  8. IAM Roles do not have any credentials associated with them.

  9. IAM Roles are intended to be assumable by anyone who needs them.

  10. IAM can be used from the AWS CLI, AWS SDK and AWS Management Console.

Architecture Diagram

Tasks Details

  1. Log in to the AWS Management Console.

  2. Create an S3 Bucket.

  3. Create an IAM Role.

  4. Create a DynamoDB table.

  5. Create an SNS Topic.

  6. Create insert Lambda functions.

  7. Create process Lambda functions.

  8. Create list of Lambda functions.

  9. Create an API Gateway.

  10. Host a Serverless Application.

  11. Test the application.

  12. Validation of the lab.

  13. Deleting AWS Resources.