AWS Cloud Operations Blog
Create speech-enabled products using AWS Service Catalog and Amazon Polly
In this post, we’ll show how enterprises can use AWS Service Catalog to create AWS Service Catalog products based on AWS machine learning (ML) services, such as Amazon Polly and Amazon Rekognition.
These products are packaged in AWS Service Catalog portfolios that customers can use for their use cases. These portfolios can generate revenue for service provider when deployed in a service provider managed environment. In this post, we’ll focus on a use case for Amazon Polly.Preview Changes (opens in a new tab)
Amazon Polly is a service that turns text into lifelike speech, which in turn lets you create applications that can talk and build speech-enabled products. Amazon Polly uses advanced deep learning technology to synthesize speech that sounds like the human voice. Many organizations need to provide spoken responses with their web and mobile applications, like accessibility applications for visually impaired people, news readers, story readers, e-learning platforms, and internet connected devices. Amazon Polly produces high-quality audio files with superior natural speech, high pronunciation accuracy, and low latency, all in a cost-effective manner.
Prerequisites
- Amazon Polly
- Amazon Simple Storage Service (S3)
- AWS CloudFormation
- AWS Service Catalog
- AWS Lambda
- AWS Systems Manager
Concepts and terminology
The following AWS Service Catalog concepts are used in this post
- A product is a blueprint for building the AWS resources necessary to make it available for deployment on AWS, along with the configuration information. Create a product by importing an AWS CloudFormation template, or, in case of AWS Marketplace-based products, by copying the product to the AWS Service Catalog. A product can belong to multiple portfolios.
- A portfolio is a collection of products, together with the configuration information. Use portfolios to manage user access to specific products. You can grant portfolio access for an AWS Identity and Access Management (IAM) user, IAM group, or IAM role level.
- A provisioned product is an AWS CloudFormation stack. In other words, the AWS resources that are created. When an end-user launches a product, AWS Service Catalog provisions the product from an AWS CloudFormation stack.
- Constraints control the way that users can deploy a product. Launch constraints let you specify a role that the AWS Service Catalog can assume to launch a product.
For more information, see Overview of AWS Service Catalog in the AWS Service Catalog administrator guide.
Solution overview
The following diagram maps out the solution architecture.
The walkthrough includes the following steps:
- The managed service provider creates an Amazon Polly AWS Service Catalog product through CloudFormation.
- The AWS Service Catalog administrator in the member account adds the portfolio and product by launching the CloudFormation template.
- End users in the member account use the AWS Service Catalog product.
Configure the environment
For your convenience, this post provides an AWS CloudFormation template to automate the creation of required AWS resources. We recommend using the northern Virginia Region (US-East-1) for this walkthrough.
Download the CloudFormation Template and create an S3 bucket
- Sign in to the new AWS account as an administrator with permissions to create AWS resources.
- Download this CloudFormation Template locally and extract its contents. It will create a folder named content.
- Create an S3 bucket and note its name.
- Upload the content folder to the bucket.
- Open the content/scpolly folder.
- Select the scpolly_setup.json file.
- Within the Object overview section, copy the object URL.
Deploy the CloudFormation template
- Sign in to your AWS account as an administrator with permissions to create AWS resources.
- In the AWS CloudFormation console, choose Create stack, and then choose With new resources (standard).
- In the Specify template section, choose Amazon S3 URL.
- In the Amazon S3 URL field, paste the object URL that you copied in the previous procedure, and then choose Next.
- On Specify stack details, for Stack name, enter scpollysetup.
- For SourceBucket, enter the name of your S3 bucket that you created earlier, and then choose Next.
- On the Configure stack options page, choose Next.
On the Review page, select I acknowledge that AWS CloudFormation might create IAM resources, and then choose Create stack. Your stack is ready when the status changes to CREATE_COMPLETE.
Launch the AWS Service Catalog product
- On the Outputs tab of the CloudFormation console, right-click on the SwitchRoleSCEndUserRole URL, and then choose Open Link in the new Tab.
- Choose Switch Role.
- Open the AWS Service Catalog console.
- Choose the SCpolly product (for provision product name, click generate name).
- Choose Launch product.
- Select an InputFolder, such as the example provided leadership-principles.
- For Your Email, enter the email address into which the results should go.
- Choose Launch product.
- When the status of the product changes to Available, choose Events.
- Choose Outputlink to view the results and listen to the Amazon Polly-created MP3 files. By default, it’s accessible for only three hours.
- Choose InputFolder to add additional folders of text, then go to the Update folder section.
- Scroll down and choose the report URL. The report displays the title of the text document and a graph. The report isn’t public.
Adding additional folders
Prerequisites
This section requires the following prerequisites:
- Create a folder on your local system
- Create text files in the folder and save with a .txt extension
Follow these steps to complete this section:
- Open the AWS Service Catalog console.
- Choose the SCpolly product.
- Choose Provisioned products.
- Choose a previously provisioned product.
- Right-click on the inputFolder URL and open in a new tab.
- Choose the Upload button.
- Choose Add folder and upload the folder(s).
Updating the service catalog product
- On the Outputs tab of the CloudFormation console, right-click the SwitchRoleSCEndUserRole URL, and then choose Open Link in new Tab.
- Choose Switch Role.
- Open the AWS Service Catalog console.
- Choose the SCpolly product
- Choose Launch product.
- Choose update for the inputFolder parameter.
- For YourEmail, enter the email address to which results should go.
- Choose Launch product (this step will add the new folders to the dropdown InputFolder to be available next time).
Cleanup
To avoid ongoing charges to your account, delete the resources that you created. In the AWS Service Catalog console, choose Provisioned products and from the Actions menu, choose Terminate.
Conclusion
AWS Service Catalog enables organizations to create and manage catalogs of approved IT services for use on AWS. In this post, we showed how managed service providers can use AWS Service Catalog and CloudFormation to create AWS Service Catalog portfolios that customers can use for their use cases.
AWS Control Tower is a managed AWS service that automates the creation of a multi-account AWS environment based upon the AWS Well-Architected Framework (AWS WAF) to capture AWS best practices for security and management services. In AWS Control Tower, AWS Organizations helps centrally share resources across your member AWS accounts. AWS Service Catalog portfolios can be managed centrally and distributed across your enterprise using Organizations in a multi-account environment.