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 Area. Once you activate this characteristic, all sources, variations, and aliases related after activation shall be synchronized throughout the chosen Areas. With International Resiliency, the replicated bot sources and aliases within the second Area may have the identical identifiers as these within the supply Area. This consistency permits you to 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 possibly can swiftly redirect your bot visitors to a unique Area. Functions 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 now not have to manually handle separate bots throughout Areas, as a result of the characteristic routinely replicates and retains Regional configurations in sync. With just some clicks or instructions, you achieve sturdy Amazon Lex bot replication capabilities. Functions which are utilizing Amazon Lex bots can now fail over from an impaired Area seamlessly, minimizing the danger of expensive downtime and sustaining enterprise continuity. This characteristic streamlines the method of sustaining sturdy and extremely obtainable conversational functions. These embrace interactive voice response (IVR) methods, 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 technique of bot variations and aliases throughout a number of Areas. Moreover, we focus on how one can deal with integrations with AWS Lambda and Amazon CloudWatch after enabling International Resiliency.
Answer 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 resembling 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 duplicate Area. We then replicate this bot, allow logging, and combine it with a Lambda perform.
To raised perceive the answer, discuss with the next structure diagram.
- Enabling International Resiliency for an Amazon Lex bot is simple utilizing the AWS Administration Console, AWS Command Line Interface (AWS CLI), or APIs. We stroll via the directions to copy the bot later on this publish.
- After replication is efficiently enabled, the bot shall be replicated throughout Areas, offering a unified expertise. This lets you distribute IVR or chat utility 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 constantly work on bot enhancements within the supply Area, and modifications are routinely synchronized to the duplicate 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 info, see Use International Resiliency to deploy bots to different Areas.
Conditions
You need 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 companies:
- AWS CloudFormation
- Amazon CloudWatch
- AWS Lambda
- Amazon Lex
Create a pattern Amazon Lex bot
To arrange a pattern bot for our use case, discuss with Handle your Amazon Lex bot by way of 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 shall 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 out there underneath Deployment within the navigation pane. If this feature isn’t seen, the International Resiliency characteristic is probably not enabled in your account. On this case, discuss 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 reproduction 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.
- Underneath Deployment within the navigation pane, select International Resiliency.
You possibly can see the replication particulars right here. Since you haven’t enabled International Resiliency but, all the small print are clean.
- Select Create duplicate 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 duplicate Area (
us-west-2
).
You possibly can see that the BookHotel bot is replicated. It is a read-only duplicate and the bot ID within the duplicate Area matches the bot ID within the supply Area.
- Underneath Deployment within the navigation pane, select International Resiliency.
You possibly can see the replication particulars right here, that are the identical as that within the supply Area BookHotel bot.
You’ve gotten verified that the bot is replicated efficiently after International Resiliency is enabled. Solely new variations and aliases created from this level onward shall be replicated. As a subsequent step, we create a bot model and alias to display 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 known 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, resembling BookHotelDemoAlias
and TestBotAlias
, don’t have International Resiliency enabled.
- Select International Resiliency within the navigation pane to view the supply and replication particulars.
The main points for Final replicated model at the moment are up to date to Model 2.
- Swap to the duplicate Area (
us-west-2
) and select International Resiliency within the navigation pane.
You possibly can 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 gotten verified that the brand new model and alias have been created after International Resiliency is replicated to the duplicate 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 companies resembling enabling customized logic with Lambda features and logging with dialog logs utilizing CloudWatch and Amazon Easy 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 duplicate 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 duplicate 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 identify and CloudWatch log group identify 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 duplicate Area (
us-west-2
) and navigate to the BookHotel. - Select Aliases within the navigation pane, and select the
BookHotelDemoAlias_GR
.
You possibly can 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 possibly can see that the book-hotel-lambda
perform is related to the BookHotel alias.
By way of this course of, we’ve demonstrated how Lambda features and CloudWatch log teams are routinely related to the corresponding bot sources within the duplicate Area for the replicated bots, offering a seamless and constant integration throughout each Areas.
Disabling International Resiliency
You’ve gotten the pliability to disable International Resiliency at any time. By disabling International Resiliency, your supply bot, together with its related aliases and variations, will now not be replicated throughout different Areas. On this part, we display 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. - Underneath 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 duplicate Area.
The replication standing will change to Deleting, and after a couple of minutes, the deletion course of shall be full. You’ll then see the Create duplicate possibility obtainable once more. In case you don’t see it, strive refreshing the web page.
- Examine the Bot variations web page of the BookHotel bot to verify that Model 2 continues to be the newest model.
- Examine the Aliases web page to verify that the
BookHotelDemoAlias_GR
alias continues to be current on the supply bot.
Functions referring to this alias can proceed to perform as regular within the supply Area.
- Swap to the duplicate Area (
us-west-2
) to verify that the BookHotel bot has been deleted from this Area.
You possibly can reenable International Resiliency on the supply Area (us-east-1
) by going via the method described earlier on this publish.
Clear up
To forestall incurring prices, full the next steps to wash up the sources 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 Join International Resiliency, offering you with a complete resolution for sustaining enterprise continuity and resilience throughout your conversational AI and call middle infrastructure. Amazon Join International Resiliency allows you to routinely keep your cases synchronized throughout two Areas, ensuring that every one configuration sources, resembling contact flows, queues, and brokers, are true replicas of one another.
With the addition of Amazon Lex International Resiliency, Amazon Join clients achieve the additional advantage of automated synchronization of their Amazon Lex V2 bots related to their contact flows. This integration offers 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 possibly can obtain end-to-end resilience. This minimizes the danger of downtime and makes positive your conversational AI and call middle operations stay extremely obtainable and responsive, even within the case of Regional failures or capability constraints.
International Resiliency APIs
International Resiliency offers API assist to create and handle replicas. These are supported within the AWS CLI and AWS SDKs. On this part, we display utilization with the AWS CLI.
- Create a bot duplicate within the duplicate 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 listing contains solely the replicated bot variations, which have been created after International Resiliency was enabled. Within the API response, a botVersionReplicationStatus
of Accessible signifies that the bot model was replicated efficiently.
- Checklist all of the alias replication statuses relevant for International Resiliency utilizing the ListBotAliasReplicas.
This listing contains solely the replicated bot aliases, which have been created after International Resiliency was enabled. Within the API response, a botAliasReplicationStatus
of Accessible 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 possibly can discover International Resiliency and apply the methods 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 resolution structure.
In regards to the Authors
Priti Aryamane is a Specialty Marketing consultant at AWS Skilled Companies. With over 15 years of expertise in touch facilities and telecommunications, Priti makes a speciality of 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 Companies with over 20 years of expertise in telecommunications, contact middle expertise, and buyer expertise. He makes a speciality of 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 captivated with streamlining adoption processes by utilizing automation wherever doable. Exterior of labor, Sanjeet enjoys hanging out along with his household, having barbecues, and going to the seaside.
Yogesh Khemka is a Senior Software program Growth Engineer at AWS, the place he works on giant language fashions and pure language processing. He focuses on constructing methods and tooling for scalable distributed deep studying coaching and real-time inference.