AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Lex::Bot

CfnBot

> Amazon Lex V2 is the only supported version in CloudFormation . Specifies an Amazon Lex conversational bot. You must configure an intent based on the `AMAZON.FallbackIntent` built-in intent. If you don't add one, creating the bot will fail.

Import

import { CfnBot } from 'aws-cdk-lib/aws-lex';

Or use the module namespace:

import * as lex from 'aws-cdk-lib/aws-lex';
// lex.CfnBot

Properties

Configuration passed to the constructor as CfnBotProps.

dataPrivacyRequired
any

By default, data stored by Amazon Lex is encrypted. The `DataPrivacy` structure provides settings that determine how Amazon Lex handles special cases of securing the data for your bot.

idleSessionTtlInSecondsRequired
number

The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout. You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.

nameRequired
string

The name of the bot locale.

roleArnRequired
string | IRoleRef

The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.

autoBuildBotLocalesOptional
boolean | IResolvable

Indicates whether Amazon Lex V2 should automatically build the locales for the bot after a change.

botFileS3LocationOptional
IResolvable | S3LocationProperty

The Amazon S3 location of files used to import a bot. The files must be in the import format specified in [JSON format for importing and exporting](https://docs.aws.amazon.com/lexv2/latest/dg/import-export-format.html) in the *Amazon Lex developer guide.*

botLocalesOptional
IResolvable | IResolvable | BotLocaleProperty[]

A list of locales for the bot.

botTagsOptional
CfnTag[]

A list of tags to add to the bot. You can only add tags when you import a bot. You can't use the `UpdateBot` operation to update tags. To update tags, use the `TagResource` operation.

descriptionOptional
string

The description of the version.

errorLogSettingsOptional
IResolvable | ErrorLogSettingsProperty
replicationOptional
IResolvable | ReplicationProperty
testBotAliasSettingsOptional
IResolvable | TestBotAliasSettingsProperty

Specifies configuration settings for the alias used to test the bot. If the `TestBotAliasSettings` property is not specified, the settings are configured with default values.

testBotAliasTagsOptional
IResolvable | IResolvable | CfnTag[]

A list of tags to add to the test alias for a bot. You can only add tags when you import a bot. You can't use the `UpdateAlias` operation to update tags. To update tags on the test alias, use the `TagResource` operation.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter