Amazon Lex Model Building V2

2026/03/10 - Amazon Lex Model Building V2 - 5 new api methods

DescribeBotAnalyzerRecommendation (new) Link ¶

Retrieves the analysis results and recommendations for bot optimization. The analysis must be in Available status before recommendations can be retrieved.

Recommendations are returned with pagination support. Each recommendation includes the issue location, priority level, detailed description, and proposed fix.

See also: AWS API Documentation

Request Syntax

client.describe_bot_analyzer_recommendation(
    botId='string',
    botAnalyzerRequestId='string',
    nextToken='string',
    maxResults=123
)
type botId:

string

param botId:

[REQUIRED]

The unique identifier of the bot.

type botAnalyzerRequestId:

string

param botAnalyzerRequestId:

[REQUIRED]

The unique identifier of the analysis request.

type nextToken:

string

param nextToken:

If the response from a previous request was truncated, the nextToken value is used to retrieve the next page of recommendations.

type maxResults:

integer

param maxResults:

The maximum number of recommendations to return in the response. The default is 5.

rtype:

dict

returns:

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botAnalyzerStatus': 'Processing'|'Available'|'Failed'|'Stopping'|'Stopped',
    'creationDateTime': datetime(2015, 1, 1),
    'botAnalyzerRecommendationList': [
        {
            'issueLocation': {
                'botLocale': 'string',
                'intentId': 'string',
                'slotId': 'string'
            },
            'priority': 'High'|'Medium'|'Low',
            'issueDescription': 'string',
            'proposedFix': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot.

    • botVersion (string) --

      The version of the bot that was analyzed.

    • localeId (string) --

      The locale identifier of the bot locale that was analyzed.

    • botAnalyzerStatus (string) --

      The current status of the analysis.

      Valid Values: Processing | Available | Failed | Stopping | Stopped

    • creationDateTime (datetime) --

      The date and time when the analysis was initiated.

    • botAnalyzerRecommendationList (list) --

      A list of recommendations for optimizing your bot configuration. Each recommendation includes the issue location, priority, description, and proposed fix.

      • (dict) --

        Contains a recommendation for bot optimization identified by the Bot Analyzer.

        • issueLocation (dict) --

          The location information for the identified issue within the bot configuration.

          • botLocale (string) --

            The locale identifier where the issue was found.

          • intentId (string) --

            The intent identifier where the issue was found, if applicable.

          • slotId (string) --

            The slot identifier where the issue was found, if applicable.

        • priority (string) --

          The priority level of the recommendation.

          Valid Values: High | Medium | Low

        • issueDescription (string) --

          A detailed description of the identified configuration issue.

        • proposedFix (string) --

          The recommended solution to address the identified issue.

    • nextToken (string) --

      If the response is truncated, this token can be used in a subsequent request to retrieve the next page of recommendations.

StartBotAnalyzer (new) Link ¶

Initiates an asynchronous analysis of your bot configuration using AI-powered analysis to identify potential issues and recommend improvements based on AWS best practices.

The analysis examines your bot's configuration, including intents, utterances, slots, and conversation flows, to provide actionable recommendations for optimization.

See also: AWS API Documentation

Request Syntax

client.start_bot_analyzer(
    botId='string',
    analysisScope='BotLocale',
    localeId='string',
    botVersion='string'
)
type botId:

string

param botId:

[REQUIRED]

The unique identifier of the bot to analyze.

type analysisScope:

string

param analysisScope:

[REQUIRED]

The scope of analysis to perform. Currently only BotLocale scope is supported.

Valid Values: BotLocale

type localeId:

string

param localeId:

The locale identifier for the bot locale to analyze. Required when analysisScope is BotLocale.

type botVersion:

string

param botVersion:

The version of the bot to analyze. Defaults to DRAFT if not specified.

rtype:

dict

returns:

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botAnalyzerStatus': 'Processing'|'Available'|'Failed'|'Stopping'|'Stopped',
    'botAnalyzerRequestId': 'string',
    'creationDateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot being analyzed.

    • botVersion (string) --

      The version of the bot being analyzed.

    • localeId (string) --

      The locale identifier of the bot locale being analyzed.

    • botAnalyzerStatus (string) --

      The current status of the analysis. The initial status is Processing.

      Valid Values: Processing | Available | Failed | Stopping | Stopped

    • botAnalyzerRequestId (string) --

      A unique identifier for this analysis request. Use this identifier to check the status and retrieve results.

    • creationDateTime (datetime) --

      The date and time when the analysis was initiated.

StopBotAnalyzer (new) Link ¶

Cancels an ongoing bot analysis execution. Once stopped, the analysis cannot be resumed and no recommendations will be generated.

See also: AWS API Documentation

Request Syntax

client.stop_bot_analyzer(
    botId='string',
    botAnalyzerRequestId='string'
)
type botId:

string

param botId:

[REQUIRED]

The unique identifier of the bot.

type botAnalyzerRequestId:

string

param botAnalyzerRequestId:

[REQUIRED]

The unique identifier of the analysis request to stop.

rtype:

dict

returns:

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botAnalyzerStatus': 'Processing'|'Available'|'Failed'|'Stopping'|'Stopped',
    'botAnalyzerRequestId': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot.

    • botVersion (string) --

      The version of the bot.

    • localeId (string) --

      The locale identifier of the bot locale.

    • botAnalyzerStatus (string) --

      The updated status of the analysis. The status will be Stopping and will eventually transition to Stopped.

      Valid Values: Processing | Available | Failed | Stopping | Stopped

    • botAnalyzerRequestId (string) --

      The unique identifier of the analysis request.

DeleteBotAnalyzerRecommendation (new) Link ¶

Permanently deletes the recommendations and analysis results for a specific bot analysis request. This operation is provided for GDPR compliance and cannot be undone.

After deletion, the analysis results cannot be retrieved. The analysis request ID will still appear in the history list, but attempting to describe the recommendations will return a ResourceNotFoundException.

See also: AWS API Documentation

Request Syntax

client.delete_bot_analyzer_recommendation(
    botId='string',
    botAnalyzerRequestId='string'
)
type botId:

string

param botId:

[REQUIRED]

The unique identifier of the bot.

type botAnalyzerRequestId:

string

param botAnalyzerRequestId:

[REQUIRED]

The unique identifier of the analysis request whose recommendations should be deleted.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListBotAnalyzerHistory (new) Link ¶

Retrieves a list of historical bot analysis executions for a specific bot. You can filter the results by locale and bot version.

The history includes all analysis executions regardless of their status, allowing you to track past analyses and their outcomes.

See also: AWS API Documentation

Request Syntax

client.list_bot_analyzer_history(
    botId='string',
    localeId='string',
    botVersion='string',
    nextToken='string',
    maxResults=123
)
type botId:

string

param botId:

[REQUIRED]

The unique identifier of the bot.

type localeId:

string

param localeId:

The locale identifier to filter the history. If not specified, returns history for all locales.

type botVersion:

string

param botVersion:

The bot version to filter the history. If not specified, defaults to DRAFT.

type nextToken:

string

param nextToken:

If the response from a previous request was truncated, the nextToken value is used to retrieve the next page of history entries.

type maxResults:

integer

param maxResults:

The maximum number of history entries to return in the response. The default is 10.

rtype:

dict

returns:

Response Syntax

{
    'botId': 'string',
    'localeId': 'string',
    'botVersion': 'string',
    'botAnalyzerHistoryList': [
        {
            'botAnalyzerStatus': 'Processing'|'Available'|'Failed'|'Stopping'|'Stopped',
            'creationDateTime': datetime(2015, 1, 1),
            'botAnalyzerRequestId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • botId (string) --

      The unique identifier of the bot.

    • localeId (string) --

      The locale identifier used to filter the history.

    • botVersion (string) --

      The bot version used to filter the history.

    • botAnalyzerHistoryList (list) --

      A list of historical analysis executions, ordered by creation date with the most recent first.

      • (dict) --

        Contains summary information about a historical bot analysis execution.

        • botAnalyzerStatus (string) --

          The status of the historical analysis execution.

          Valid Values: Processing | Available | Failed | Stopping | Stopped

        • creationDateTime (datetime) --

          The date and time when the analysis was initiated.

        • botAnalyzerRequestId (string) --

          The unique identifier for the analysis request.

    • nextToken (string) --

      If the response is truncated, this token can be used in a subsequent request to retrieve the next page of history entries.