

# Getting started with Amazon Polly
<a name="getting-started"></a>

Amazon Polly provides several API operations that you can easily integrate with your existing applications. For a list of supported operations, see [Actions](API_Operations.md).

You can perform almost all of the same operations on the Amazon Polly console and the AWS CLI. However, you can't listen to synthesized speech on the AWS CLI. To work with audio on the AWS CLI, save your text to a file. Then open the file in an audio application of your choice. 

You can use either of the following options:
+ AWS SDKs – When using the SDKs, your requests to Amazon Polly are automatically signed and authenticated using the credentials you provide. This is the recommended choice for building your applications. 
+ AWS CLI – You can use the AWS CLI to use Amazon Polly without writing any code.

 Before you use Amazon Polly for the first time, you must sign up for AWS. When you sign up for Amazon Web Services (AWS), your AWS account is automatically signed up for all services in AWS, including Amazon Polly. You're charged only for the services and resources that you use. If you're a new AWS customer, you can get started with Amazon Polly with no charge. For more information, see [AWS Free Usage Tier](https://aws.amazon.com/free/).

The following sections describe how to get started using Amazon Polly.

**Topics**
+ [

# Signing up for AWS
](signup.md)
+ [

# Setting up the AWS CLI
](setup-cli.md)
+ [

# Reconfiguring the AWS CLI
](reconfigure-cli.md)

# Signing up for AWS
<a name="signup"></a>

Before you can use any AWS service, including Amazon Polly, you must sign up for AWS.

## Sign up for an AWS account
<a name="sign-up-for-aws"></a>

If you do not have an AWS account, complete the following steps to create one.

**To sign up for an AWS account**

1. Open [https://portal.aws.amazon.com/billing/signup](https://portal.aws.amazon.com/billing/signup).

1. Follow the online instructions.

   Part of the sign-up procedure involves receiving a phone call or text message and entering a verification code on the phone keypad.

   When you sign up for an AWS account, an *AWS account root user* is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform [tasks that require root user access](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks).

AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to [https://aws.amazon.com/](https://aws.amazon.com/) and choosing **My Account**.

## Create a user with administrative access
<a name="create-an-admin"></a>

After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks.

**Secure your AWS account root user**

1.  Sign in to the [AWS Management Console](https://console.aws.amazon.com/) as the account owner by choosing **Root user** and entering your AWS account email address. On the next page, enter your password.

   For help signing in by using root user, see [Signing in as the root user](https://docs.aws.amazon.com/signin/latest/userguide/console-sign-in-tutorials.html#introduction-to-root-user-sign-in-tutorial) in the *AWS Sign-In User Guide*.

1. Turn on multi-factor authentication (MFA) for your root user.

   For instructions, see [Enable a virtual MFA device for your AWS account root user (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/enable-virt-mfa-for-root.html) in the *IAM User Guide*.

**Create a user with administrative access**

1. Enable IAM Identity Center.

   For instructions, see [Enabling AWS IAM Identity Center](https://docs.aws.amazon.com//singlesignon/latest/userguide/get-set-up-for-idc.html) in the *AWS IAM Identity Center User Guide*.

1. In IAM Identity Center, grant administrative access to a user.

   For a tutorial about using the IAM Identity Center directory as your identity source, see [ Configure user access with the default IAM Identity Center directory](https://docs.aws.amazon.com//singlesignon/latest/userguide/quick-start-default-idc.html) in the *AWS IAM Identity Center User Guide*.

**Sign in as the user with administrative access**
+ To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user.

  For help signing in using an IAM Identity Center user, see [Signing in to the AWS access portal](https://docs.aws.amazon.com/signin/latest/userguide/iam-id-center-sign-in-tutorial.html) in the *AWS Sign-In User Guide*.

**Assign access to additional users**

1. In IAM Identity Center, create a permission set that follows the best practice of applying least-privilege permissions.

   For instructions, see [ Create a permission set](https://docs.aws.amazon.com//singlesignon/latest/userguide/get-started-create-a-permission-set.html) in the *AWS IAM Identity Center User Guide*.

1. Assign users to a group, and then assign single sign-on access to the group.

   For instructions, see [ Add groups](https://docs.aws.amazon.com//singlesignon/latest/userguide/addgroups.html) in the *AWS IAM Identity Center User Guide*.

For more information about IAM, see the following:
+ [AWS Identity and Access Management (IAM)](https://aws.amazon.com/iam/)
+ [Getting started with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started.html)
+ [IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/)

**Note**  
Note your AWS account ID. You will need it in the next steps.

# Setting up the AWS CLI
<a name="setup-cli"></a>

Follow these steps to download and configure the AWS CLI to work with Amazon Polly.

**To set up the AWS Command Line Interface**

1. Download and configure the AWS CLI. For instructions, see the following topics in the *AWS Command Line Interface User Guide*: 
   + [Getting Set Up with the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html) 
   + [Configuring the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) 

1. Add a named profile for the administrator user in the AWS CLI AWS Config file. You can use this profile when running the AWS CLI commands. For more information about named profiles, see [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) in the *AWS Command Line Interface User Guide*. 

   ```
   [profile adminuser]
       aws_access_key_id = adminuser access key ID
       aws_secret_access_key = adminuser secret access key
       region = aws-region
   ```

   For a list of available AWS Regions and those supported by Amazon Polly, see [Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html) in the *Amazon Web Services General Reference*. 
**Note**  
If you're using a Region supported by Amazon Polly that you specified when you configured the AWS CLI, omit the following line from the AWS CLI code examples.   

   ```
   --region aws-region
   ```

1. Verify the setup by typing the following help command at the command prompt. 

   ```
   aws help
   ```

   A list of valid AWS commands should appear in the AWS CLI window. 

# Reconfiguring the AWS CLI
<a name="reconfigure-cli"></a>

If you've previously downloaded and configured the AWS CLI, Amazon Polly might be unavailable unless you reconfigure the AWS CLI. The following procedure checks to see if this is necessary.

**To reactivate Amazon Polly from the AWS CLI**

1. Verify the availability of Amazon Polly by typing the following help command at the AWS CLI command prompt. 

   ```
   aws polly help
   ```

   If you see a description of Amazon Polly and a list of valid commands appears in the AWS CLI window, you can use Amazon Polly from the AWS CLI immediately. In this case, you can skip the rest of this procedure. If this is not displayed, continue with Step 2. 

1. Activate Amazon Polly using one of the two following options:

   1. Uninstall and reinstall the AWS CLI.

      For instructions, see [Installing the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html) in the *AWS Command Line Interface User Guide*. 

      

      or

   1. Download the file [service-2.json.](https://github.com/boto/botocore/blob/develop/botocore/data/polly/2016-06-10/service-2.json)

      At the command prompt, run the following command.

      ```
      aws configure add-model --service-model file://service-2.json --service-name polly
      ```

1. Reverify the availability of Amazon Polly.

   ```
   aws polly help
   ```

   The description of Amazon Polly should be visible.