PutLexicon - Amazon Polly


Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation.

For more information, see Managing Lexicons.

Request Syntax

PUT /v1/lexicons/LexiconName HTTP/1.1 Content-type: application/json { "Content": "string" }

URI Request Parameters

The request uses the following URI parameters.


Name of the lexicon. The name must follow the regular express format [0-9A-Za-z]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.

Pattern: [0-9A-Za-z]{1,20}

Required: Yes

Request Body

The request accepts the following data in JSON format.


Content of the PLS lexicon as string data.

Type: String

Required: Yes

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.



Amazon Polly can't find the specified lexicon. Verify that the lexicon's name is spelled correctly, and then try again.

HTTP Status Code: 400


The maximum size of the specified lexicon would be exceeded by this operation.

HTTP Status Code: 400


The maximum size of the lexeme would be exceeded by this operation.

HTTP Status Code: 400


The maximum number of lexicons would be exceeded by this operation.

HTTP Status Code: 400


An unknown condition has caused a service failure.

HTTP Status Code: 500


The alphabet specified by the lexicon is not a supported alphabet. Valid values are x-sampa and ipa.

HTTP Status Code: 400


The language specified in the lexicon is unsupported. For a list of supported languages, see Lexicon Attributes.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: