---
title: "PUT /bots/{botId}/botaliases/"
method: PUT
path: "/bots/{botId}/botaliases/"
---

# PUT /bots/{botId}/botaliases/

`PUT /bots/{botId}/botaliases/`

Creates an alias for the specified version of a bot. Use an alias to enable you to change the version of a bot without updating applications that use the bot.

For example, you can create an alias called "PROD" that your applications use to call the Amazon Lex bot.

## Path parameters

- `botId` string, required

## Request body

- object
  - `botAliasName` string, required — The alias to create. The name must be unique for the bot.
  - `description` string — A description of the alias. Use this description to help identify the alias.
  - `botVersion` string — The version of the bot that this alias points to. You can use the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_UpdateBotAlias.html">UpdateBotAlias</a> operation to change the bot version associated with the alias.
  - `botAliasLocaleSettings` object — Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda function to run different functions in different locales.
  - `conversationLogSettings` object — Configures conversation logging that saves audio, text, and metadata for the conversations with your users.
    - `textLogSettings` TextLogSetting[] — The Amazon CloudWatch Logs settings for logging text and metadata.
      - `enabled` boolean, required — Determines whether conversation logs should be stored for an alias.
      - `destination` TextLogDestination, required — Defines the Amazon CloudWatch Logs destination log group for conversation text logs.
        - `cloudWatch` object, required — Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
          - `cloudWatchLogGroupArn` string, required — The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.
          - `logPrefix` string, required — The prefix of the log stream name within the log group that you specified
    - `audioLogSettings` AudioLogSetting[] — The Amazon S3 settings for logging audio to an S3 bucket.
      - `enabled` boolean, required — Determines whether audio logging in enabled for the bot.
      - `destination` AudioLogDestination, required — The location of audio log files collected when conversation logging is enabled for a bot.
        - `s3Bucket` object, required — The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the <code>roleArn</code> parameter of the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateBot.html">CreateBot</a> operation must have permission to write to this bucket.
          - `kmsKeyArn` string — The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.
          - `s3BucketArn` string, required — The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.
          - `logPrefix` string, required — The S3 prefix to assign to audio log files.
  - `sentimentAnalysisSettings` object — Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
    - `detectSentiment` boolean — Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.
  - `tags` object — A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the <code>UpdateBotAlias</code> operation to update the tags on a bot alias. To update tags, use the <code>TagResource</code> operation.

## Response `202`

Success

- CreateBotAliasResponse
  - `botAliasId` string — The unique identifier of the bot alias.
  - `botAliasName` string — The name specified for the bot alias.
  - `description` string — The description specified for the bot alias.
  - `botVersion` string — The version of the bot associated with this alias.
  - `botAliasLocaleSettings` object — Configuration information for a specific locale.
  - `conversationLogSettings` object — The conversation log settings specified for the alias.
    - `textLogSettings` TextLogSetting[] — The Amazon CloudWatch Logs settings for logging text and metadata.
      - `enabled` boolean, required — Determines whether conversation logs should be stored for an alias.
      - `destination` TextLogDestination, required — Defines the Amazon CloudWatch Logs destination log group for conversation text logs.
        - `cloudWatch` object, required — Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
          - `cloudWatchLogGroupArn` string, required — The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.
          - `logPrefix` string, required — The prefix of the log stream name within the log group that you specified
    - `audioLogSettings` AudioLogSetting[] — The Amazon S3 settings for logging audio to an S3 bucket.
      - `enabled` boolean, required — Determines whether audio logging in enabled for the bot.
      - `destination` AudioLogDestination, required — The location of audio log files collected when conversation logging is enabled for a bot.
        - `s3Bucket` object, required — The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the <code>roleArn</code> parameter of the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateBot.html">CreateBot</a> operation must have permission to write to this bucket.
          - `kmsKeyArn` string — The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.
          - `s3BucketArn` string, required — The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.
          - `logPrefix` string, required — The S3 prefix to assign to audio log files.
  - `sentimentAnalysisSettings` SentimentAnalysisSettings — Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
    - `detectSentiment` boolean, required — Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.
  - `botAliasStatus` 'Creating' | 'Available' | 'Deleting' | 'Failed' — The current status of the alias. The alias is first put into the <code>Creating</code> state. When the alias is ready to be used, it is put into the <code>Available</code> state. You can use the <code>DescribeBotAlias</code> operation to get the current state of an alias.
  - `botId` string — The unique identifier of the bot that this alias applies to.
  - `creationDateTime` string, date-time — A Unix timestamp indicating the date and time that the bot alias was created.
  - `tags` object — A list of tags associated with the bot alias.

## Other responses

- `480` — ThrottlingException
- `481` — ServiceQuotaExceededException
- `482` — ValidationException
- `483` — PreconditionFailedException
- `484` — ConflictException
- `485` — InternalServerException

---

[API](https://skmtc.net/aws/apis/models-lex-v2.md) · [All operations](https://skmtc.net/aws/apis/models-lex-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/models-lex-v2/versions/4ee1a1257ae7/schema)
