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

# PUT /bots/{botId}/botaliases/{botAliasId}/

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

Updates the configuration of an existing bot alias.

## Path parameters

- `botAliasId` string, required
- `botId` string, required

## Request body

- object
  - `botAliasName` string, required — The new name to assign to the bot alias.
  - `description` string — The new description to assign to the bot alias.
  - `botVersion` string — The new bot version to assign to the bot alias.
  - `botAliasLocaleSettings` object — The new Lambda functions to use in each locale for the bot alias.
  - `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
      - `selectiveLoggingEnabled` boolean — The option to enable selective conversation log capture for text.
    - `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 Amazon Web Services 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.
      - `selectiveLoggingEnabled` boolean — The option to enable selective conversation log capture for audio.
  - `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.

## Response `202`

Success

- UpdateBotAliasResponse
  - `botAliasId` string — The identifier of the updated bot alias.
  - `botAliasName` string — The updated name of the bot alias.
  - `description` string — The updated description of the bot alias.
  - `botVersion` string — The updated version of the bot that the alias points to.
  - `botAliasLocaleSettings` object — The updated Lambda functions to use in each locale for the bot alias.
  - `conversationLogSettings` object — The updated settings for storing conversation logs in Amazon CloudWatch Logs and Amazon S3 buckets.
    - `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
      - `selectiveLoggingEnabled` boolean — The option to enable selective conversation log capture for text.
    - `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 Amazon Web Services 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.
      - `selectiveLoggingEnabled` boolean — The option to enable selective conversation log capture for audio.
  - `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 bot alias. When the status is <code>Available</code> the alias is ready for use.
  - `botId` string — The identifier of the bot with the updated alias.
  - `creationDateTime` string, date-time — A timestamp of the date and time that the bot was created.
  - `lastUpdatedDateTime` string, date-time — A timestamp of the date and time that the bot was last updated.

## Other responses

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

---

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