Obtain multi-Area resiliency to your conversational AI chatbots with Amazon Lex
International Resiliency is a brand new Amazon Lex functionality that allows close to real-time replication of your Amazon Lex V2 bots in a second AWS Region. While you activate this characteristic, all assets, variations, and aliases related after activation might be synchronized throughout the chosen Areas. With International Resiliency, the replicated bot assets and aliases within the second Area could have the identical identifiers as these within the supply Area. This consistency lets you seamlessly route visitors to any Area by merely altering the Area identifier, offering uninterrupted service availability. Within the occasion of a Regional outage or disruption, you may swiftly redirect your bot visitors to a distinct Area. Purposes now have the power to make use of replicated Amazon Lex bots throughout Areas in an active-active or active-passive method for improved availability and resiliency. With International Resiliency, you not have to manually handle separate bots throughout Areas, as a result of the characteristic mechanically replicates and retains Regional configurations in sync. With only a few clicks or instructions, you acquire sturdy Amazon Lex bot replication capabilities. Purposes which can be utilizing Amazon Lex bots can now fail over from an impaired Area seamlessly, minimizing the chance of expensive downtime and sustaining enterprise continuity. This characteristic streamlines the method of sustaining sturdy and extremely obtainable conversational purposes. These embody interactive voice response (IVR) programs, chatbots for digital channels, and messaging platforms, offering a seamless and resilient buyer expertise.
On this publish, we stroll you thru enabling International Resiliency for a pattern Amazon Lex V2 bot. We showcase the replication means of bot variations and aliases throughout a number of Areas. Moreover, we focus on the best way to deal with integrations with AWS Lambda and Amazon CloudWatch after enabling International Resiliency.
Resolution overview
For this train, we create a BookHotel bot as our pattern bot. We use an AWS CloudFormation template to construct this bot, together with defining intents, slots, and different required elements equivalent to a model and alias. All through our demonstration, we use the us-east-1 Area because the supply Area, and we replicate the bot within the us-west-2 Area, which serves because the reproduction Area. We then replicate this bot, allow logging, and combine it with a Lambda perform.
To higher perceive the answer, consult with the next structure diagram.
- Enabling International Resiliency for an Amazon Lex bot is simple utilizing the AWS Management Console, AWS Command Line Interface (AWS CLI), or APIs. We stroll by means of the directions to copy the bot later on this publish.
- After replication is efficiently enabled, the bot might be replicated throughout Areas, offering a unified expertise. This lets you distribute IVR or chat software requests between Areas in both an active-active or active-passive setup, relying in your use case.
- A key good thing about International Resiliency is that builders can repeatedly work on bot enhancements within the supply Area, and adjustments are mechanically synchronized to the reproduction Area. This streamlines the event workflow with out compromising resiliency.
On the time of writing, International Resiliency solely works with predetermined pairs of Areas. For extra data, see Use Global Resiliency to deploy bots to other Regions.
Stipulations
It is best to have the next conditions:
- An AWS account with administrator entry
- Entry to Amazon Lex International Resiliency (contact your Amazon Join Options Architect or Technical Account Supervisor)
- Working data of the next providers:
- AWS CloudFormation
- Amazon CloudWatch
- AWS Lambda
- Amazon Lex
Create a pattern Amazon Lex bot
To arrange a pattern bot for our use case, consult with Manage your Amazon Lex bot via AWS CloudFormation templates. For this instance, we create a bot named BookHotel within the supply Area (us-east-1
). Full the next steps:
- Obtain the CloudFormation template and deploy it within the supply Area (
us-east-1
). For directions, see Create a stack from the CloudFormation console.
Upon profitable deployment, the BookHotel bot might be created within the supply Area.
- On the Amazon Lex console, select Bots within the navigation pane and find the BookHotel.
Confirm that the International Resiliency possibility is obtainable below Deployment within the navigation pane. If this feature isn’t seen, the International Resiliency characteristic is probably not enabled to your account. On this case, consult with the conditions part for enabling the International Resiliency characteristic.
Our pattern BookHotel bot has one model (Model 1, along with the draft model) and an alias named BookHotelDemoAlias
(along with the TestBotAlias).
Allow International Resiliency
To activate International Resiliency and arrange bot replication in a duplicate Area, full the next steps:
- On the Amazon Lex console, select
us-east-1
as your Area. - Select Bots within the navigation pane and find the BookHotel.
- Below Deployment within the navigation pane, select International Resiliency.
You may see the replication particulars right here. Since you haven’t enabled International Resiliency but, all the main points are clean.
- Select Create reproduction to create a draft model of your bot.
In your supply Area (us-east-1
), after the bot replication is full, you will note Replication standing as Enabled.
- Swap to the reproduction Area (
us-west-2
).
You may see that the BookHotel bot is replicated. This can be a read-only reproduction and the bot ID within the reproduction Area matches the bot ID within the supply Area.
- Below Deployment within the navigation pane, select International Resiliency.
You may see the replication particulars right here, that are the identical as that within the supply Area BookHotel bot.
You’ve got verified that the bot is replicated efficiently after International Resiliency is enabled. Solely new variations and aliases created from this level onward might be replicated. As a subsequent step, we create a bot model and alias to exhibit the replication.
Create a brand new bot model and alias
Full the next steps to create a brand new bot model and alias:
- On the Amazon Lex console in your supply Area (
us-east-1
), navigate to the BookHotel. - Select Bot variations within the navigation pane, and select Create new model to create Model 2.
Model 2 now has International Resiliency enabled, whereas Model 1 and the draft model don’t, as a result of they have been created previous to enabling International Resiliency.
- Select Aliases within the navigation pane, then select Create new alias.
- Create a brand new alias for the BookHotel bot referred to as
BookHotelDemoAlias_GR
and level that to the brand new model.
Equally, the BookHotelDemoAlias_GR
now has International Resiliency enabled, whereas aliases created earlier than enabling International Resiliency, equivalent to BookHotelDemoAlias
and TestBotAlias
, don’t have International Resiliency enabled.
- Select International Resiliency within the navigation pane to view the supply and replication particulars.
The small print for Final replicated model at the moment are up to date to Model 2.
- Swap to the reproduction Area (
us-west-2
) and select International Resiliency within the navigation pane.
You may see that the brand new International Resiliency enabled model (Model 2) is replicated and the brand new alias BookHotelDemoAlias_GR
can be current.
You’ve got verified that the brand new model and alias have been created after International Resiliency is replicated to the reproduction Area. Now you can make Amazon Lex runtime calls to each Areas.
Dealing with integrations with Lambda and CloudWatch after enabling International Resiliency
Amazon Lex has integrations with different AWS providers equivalent to enabling custom logic with Lambda functions and logging with conversation logs utilizing CloudWatch and Amazon Simple Storage Service (Amazon S3). On this part, we affiliate a Lambda perform and CloudWatch group for the BookHotel bot within the supply Area (us-east-1
) and validate its affiliation within the reproduction Area (us-west-2
).
- Obtain the CloudFormation template to deploy a pattern Lambda and CloudWatch log group.
- Deploy the CloudFormation stack to the supply Area (
us-east-1
). For directions, see Create a stack from the CloudFormation console.
This can deploy a Lambda perform (book-hotel-lambda) and a CloudWatch log group (/lex/book-hotel-bot
) within the us-east-1
Area.
- Deploy the CloudFormation stack to the reproduction Area (
us-west-2
).
This can deploy a Lambda perform (book-hotel-lambda) and a CloudWatch log group (/lex/book-hotel-bot
) within the us-west-2
Area. The Lambda perform title and CloudWatch log group title have to be the identical in each Areas.
- On the Amazon Lex console within the supply Area (
us-east-1
), navigate to the BookHotel. - Select Aliases within the navigation pane, and select the
BookHotelDemoAlias_GR
. - Within the Languages part, select English (US).
- Choose the
book-hotel-lambda
perform and affiliate it with the BookHotel bot by selecting Save. - Navigate again to the
BookHotelDemoAlias_GR
alias, and within the Dialog logs part, select Handle dialog logs. - Allow Textual content logs and choose the
/lex/book-hotel-bot log
group, then select Save.
Dialog textual content logs at the moment are enabled for the BookHotel bot in us-east-1
.
- Swap to the reproduction Area (
us-west-2
) and navigate to the BookHotel. - Select Aliases within the navigation pane, and select the
BookHotelDemoAlias_GR
.
You may see that the dialog logs are already related to the /lex/book-hotel-bot
CloudWatch group the us-west-2
Area.
- Within the Languages part, select English (US).
You may see that the book-hotel-lambda
perform is related to the BookHotel alias.
By this course of, we have now demonstrated how Lambda features and CloudWatch log teams are mechanically related to the corresponding bot assets within the reproduction Area for the replicated bots, offering a seamless and constant integration throughout each Areas.
Disabling International Resiliency
You’ve got the pliability to disable International Resiliency at any time. By disabling International Resiliency, your supply bot, together with its related aliases and variations, will not be replicated throughout different Areas. On this part, we exhibit the method to disable International Resiliency.
- On the Amazon Lex console in your supply Area (
us-east-1
), select Bots within the navigation pane and find the BookHotel. - Below Deployment within the navigation pane, select International Resiliency.
- Select Disable International Resiliency.
- Enter verify within the affirmation field and select Delete.
This motion initiates the deletion of the replicated BookHotel bot within the reproduction Area.
The replication standing will change to Deleting, and after a couple of minutes, the deletion course of might be full. You’ll then see the Create reproduction possibility obtainable once more. When you don’t see it, attempt refreshing the web page.
- Test the Bot variations web page of the BookHotel bot to substantiate that Model 2 remains to be the most recent model.
- Test the Aliases web page to substantiate that the
BookHotelDemoAlias_GR
alias remains to be current on the supply bot.
Purposes referring to this alias can proceed to perform as regular within the supply Area.
- Swap to the reproduction Area (
us-west-2
) to substantiate that the BookHotel bot has been deleted from this Area.
You may reenable International Resiliency on the supply Area (us-east-1
) by going by means of the method described earlier on this publish.
Clear up
To forestall incurring prices, full the next steps to wash up the assets created throughout this demonstration:
- Disable International Resiliency for the bot by following the directions detailed earlier on this publish.
- Delete the
book-hotel-lambda-cw-stack
CloudFormation stack from theus-west-2
. For directions, see Delete a stack on the CloudFormation console. - Delete the
book-hotel-lambda-cw-stack
CloudFormation stack from theus-east-1
. - Delete the
book-hotel-stack
CloudFormation stack from theus-east-1
.
Integrations with Amazon Join
Amazon Lex International Resiliency seamlessly enhances Amazon Connect Global Resiliency, offering you with a complete answer for sustaining enterprise continuity and resilience throughout your conversational AI and call heart infrastructure. Amazon Join International Resiliency lets you mechanically keep your cases synchronized throughout two Areas, ensuring that each one configuration assets, equivalent to contact flows, queues, and brokers, are true replicas of one another.
With the addition of Amazon Lex International Resiliency, Amazon Connect clients acquire the additional advantage of automated synchronization of their Amazon Lex V2 bots related to their contact flows. This integration supplies a constant and uninterrupted expertise throughout failover eventualities, as a result of your Amazon Lex interactions seamlessly transition between Areas with none disruption. By combining these complementary options, you may obtain end-to-end resilience. This minimizes the chance of downtime and makes positive your conversational AI and call heart operations stay extremely obtainable and responsive, even within the case of Regional failures or capability constraints.
International Resiliency APIs
International Resiliency supplies API help to create and handle replicas. These are supported within the AWS CLI and AWS SDKs. On this part, we exhibit utilization with the AWS CLI.
- Create a bot reproduction within the reproduction Area utilizing the CreateBotReplica.
- Monitor the bot replication standing utilizing the DescribeBotReplica.
- Checklist the replicated bots utilizing the ListBotReplicas.
- Checklist all of the model replication statuses relevant for International Resiliency utilizing the ListBotVersionReplicas.
This record contains solely the replicated bot variations, which have been created after International Resiliency was enabled. Within the API response, a botVersionReplicationStatus
of Out there signifies that the bot model was replicated efficiently.
- Checklist all of the alias replication statuses relevant for International Resiliency utilizing the ListBotAliasReplicas.
This record contains solely the replicated bot aliases, which have been created after International Resiliency was enabled. Within the API response, a botAliasReplicationStatus
of Out there signifies that the bot alias was replicated efficiently.
Conclusion
On this publish, we launched the International Resiliency characteristic for Amazon Lex V2 bots. We mentioned the method to allow International Resiliency utilizing the console and reviewed a few of the new APIs launched as a part of this characteristic.
As the following step, you may discover Global Resiliency and apply the strategies mentioned on this publish to copy bots and bot variations throughout Areas. This hands-on apply will solidify your understanding of managing and replicating Amazon Lex V2 bots in your answer structure.
Concerning the Authors
Priti Aryamane is a Specialty Marketing consultant at AWS Skilled Providers. With over 15 years of expertise in touch facilities and telecommunications, Priti focuses on serving to clients obtain their desired enterprise outcomes with buyer expertise on AWS utilizing Amazon Lex, Amazon Join, and generative AI options.
Sanjeet Sanda is a Specialty Marketing consultant at AWS Skilled Providers with over 20 years of expertise in telecommunications, contact heart expertise, and buyer expertise. He focuses on designing and delivering customer-centric options with a deal with integrating and adapting current enterprise name facilities into Amazon Join and Amazon Lex environments. Sanjeet is enthusiastic about streamlining adoption processes by utilizing automation wherever potential. Outdoors of labor, Sanjeet enjoys hanging out along with his household, having barbecues, and going to the seashore.
Yogesh Khemka is a Senior Software program Improvement Engineer at AWS, the place he works on giant language fashions and pure language processing. He focuses on constructing programs and tooling for scalable distributed deep studying coaching and real-time inference.