This visitor submit was written by Mulay Ahmed and Caroline Lima-Lane of Principal Monetary Group. The content material and opinions on this submit are these of third-party authors, and AWS isn’t answerable for the content material or accuracy of this submit.
Contact facilities in the US deal with thousands and thousands of buyer calls every year. Major financial groups® We needed to modernize the calling expertise with our prospects. Within the submit Principal Monetary Group makes use of Genesys, Amazon Lex, and Amazon QuickSight to enhance voice digital assistant efficiency, we described a whole Principal digital assistant answer utilizing Genesys Cloud, Amazon Lex V2, a number of AWS providers, and a customized reporting and analytics answer utilizing Amazon QuickSight.
This submit focuses on accelerating the digital assistant (VA) platform supply course of by robotically constructing, testing, and deploying Amazon Lex V2 bots (together with different database and analytics sources described later on this submit) utilizing a GitHub steady integration and supply (CI/CD) pipeline with automated execution of the Amazon Lex V2 check workbench for high quality assurance. This answer helps principals® As an alternative of testing and deploying Amazon Lex V2 bots within the AWS Administration Console, use infrastructure as code (IaC), configuration as code (CaC), and automatic CI/CD approaches to reliably and shortly scale and keep your VA implementation.
Principal is a world monetary firm with practically 20,000 staff obsessed with bettering the wealth and well-being of individuals and companies. In enterprise for 145 years, Principal is dedicated to serving to roughly 70 million prospects (as of This autumn 2024) plan, shield, make investments and retire whereas supporting the communities by which it operates. Principal’s enterprise digital assistant engineering crew collaborated with AWS to implement a voice digital assistant utilizing Amazon Lex V2 to supply self-service and routing capabilities to contact middle prospects. The next engineering alternatives had been recognized and prioritized:
- Remove console-driven configuration, testing, and deployment of Amazon Lex V2 bots
- Collaborate with structured model management and parallel improvement workflows for a number of crew members
- Speed up improvement cycles with automated construct, check, and deployment processes for creating and optimizing Amazon Lex bots
- Enhanced high quality assurance controls with automated check gates and validation of coding requirements for dependable releases
With the automation answer described on this submit, as of September 2024, Principal has accelerated improvement efforts by 50% throughout all environments (dev, pilot, and manufacturing) via a streamlined implementation and deployment course of. The answer additionally enhances deployment reliability via automated workflows, offers constant updates whereas minimizing errors throughout improvement, pilot, and manufacturing environments, and maximizes improvement effectivity by integrating the check workbench with GitHub to allow model management and automatic testing. With check workbench automation and integration with GitHub, this answer powers your CI/CD pipeline by sustaining alignment between check information and bot variations. Create a extra agile and dependable improvement course of.
Resolution overview
This answer makes use of the providers described in Principal Monetary Group makes use of Genesys, Amazon Lex, and Amazon QuickSight to enhance voice digital assistant efficiency. The next providers/APIs are additionally used as a part of this answer:
- AWS Step Capabilities for orchestrating deployment workflows
- Check Workbench API. Invoked as a collection of duties inside a Step Capabilities state machine.
- AWS Lambda processes knowledge to help some check workbench API inputs
Organizing and managing VA codes
The Principal VA implementation makes use of Genesys Cloud because the contact middle utility and makes use of the next AWS providers organized into numerous stacks:
- Bot stack:
- Amazon Lex V2 CDK is used to outline and deploy bot infrastructure
- Lambda capabilities deal with bot logic and handle routing logic (for Amazon Lex and Genesys Cloud)
- AWS Secrets and techniques Supervisor shops secrets and techniques for calling endpoints on downstream techniques
- Check stack:
- Step Capabilities orchestrates your testing workflow
- Lambda capabilities are used within the testing course of
- Check information include check circumstances and situations in Check Workbench format
- Simulated knowledge is used to simulate numerous check situations with out connecting to downstream techniques or APIs.
- Information stack:
- Evaluation stack:
- Amazon S3 shops logs and processed knowledge
- Amazon Information Firehose streams logs to Amazon S3
- Lambda orchestrates extract, remodel, and cargo (ETL) operations
- AWS Glue manages your knowledge catalog and ETL jobs
- Amazon Athena is used to question and analyze analytical knowledge in Amazon S3
- Amazon QuickSight is used for knowledge visualization and enterprise intelligence
- CI/CD pipeline:
- GitHub acts as a supply code repository
- GitHub Workflow automates your CI/CD pipeline
Code group and CI/CD workflow for Amazon Lex V2
The next diagram exhibits how a number of builders can work on and check adjustments to a bot stack in parallel by deploying adjustments regionally or utilizing GitHub workflows.
This course of consists of the next steps:
- Builders clone the repository and create new branches for his or her adjustments.
- Developer A or B makes use of code to change the bot configuration or Lambda operate.
- Builders create pull requests.
- Builders deploy the Amazon Lex V2 CDK stack in one of many following methods:
- Create a pull request and be certain that all code high quality and requirements checks cross.
- Merge it with the primary department.
- Deploy the Amazon Lex V2 CDK stack out of your native atmosphere.
- Builders run the check workbench from their native atmosphere as a part of a CI/CD pipeline or utilizing automation scripts.
- Check outcomes seem in GitHub Actions and within the terminal (if operating regionally).
- A pipeline is barely profitable if it passes outlined checks comparable to linting, unit exams, infrastructure testing and integration, and check workbench useful exams.
- As soon as all exams and checks cross, you’ll be able to draft a brand new pre-release and deploy it to your staging atmosphere. After a profitable staging deployment and testing (automation and UAT), you’ll be able to create a brand new launch for manufacturing deployment (after handbook evaluate and approval).
Amazon Lex Check Workbench Automation
This answer makes use of GitHub and AWS providers, comparable to Step Capabilities state machines and Lambda capabilities, to orchestrate your entire testing course of on your Amazon Lex V2 bot (as a substitute of utilizing Amazon Lex’s current handbook testing course of). The pipeline triggers a check set add, a Lambda operate interacts with the Amazon Lex V2 bot and the check workbench, then one other Lambda operate reads the check outcomes and offers the leads to the pipeline.
Successfully managing and organizing your check datasets is crucial to sustaining constant and repeatable analysis of your Amazon Lex V2 bot. The next essential practices will allow you to hold your check set updated.
- Check set information are versioned and linked to every bot and its model.
- A separate golden check set is created for every intent and recurrently up to date to incorporate buyer utterances in manufacturing, bettering intent recognition charges.
- Versioned check knowledge is deployed as a part of every bot deployment in a non-production atmosphere.
The next diagram exhibits the end-to-end automated course of for testing your Amazon Lex V2 bot after every deployment.

The post-deployment workflow consists of the next steps:
- Builders test their check information right into a GitHub repository (or deploy them immediately from regionally). Each time you deploy your bot, GitHub makes use of GitHub Workflow to set off a check script.
- The check script uploads the check file to your S3 bucket.
- The check script calls the Step Capabilities state machine utilizing the bot title and an inventory of file keys as enter.
- Amazon Lex mannequin API calls are referred to as to acquire the bot ID (ListBots) and aliases (ListBotAliases).
- Every check file secret’s iterated throughout the Map state, the place the next duties are carried out:
- Begin an import job by calling the Amazon Lex API.
- Begin import – Create a check set ID and reserve it to the desired location in your S3 bucket.
- description import – Verify whether or not the StartImport standing is accomplished.
- Run the check set.
- Begin check run – Create a check execution ID and run the check.
- Checklist of check runs – Gather all check runs. The Lambda operate filters out the present check run ID and its standing.
- Get check outcomes.
- Begin an import job by calling the Amazon Lex API.
- As soon as the check is full:
- The ListTestExecutionResultItems API is named to gather total check outcomes.
- The ListTestExecutionResultItems API is named to retrieve check failure particulars on the utterance stage (if any).
- A Lambda operate coordinates the ultimate cleanup and reporting.
- DeleteTestSet cleans up check units which are not wanted out of your S3 bucket.
- The pipeline will output outcomes and if the check fails, it will likely be listed within the GitHub motion or native terminal job report.
- Builders carry out a handbook technique of reviewing check consequence information from the Check Workbench console.
conclusion
On this submit, we described how Principal used code to speed up the event, testing, and deployment of Amazon Lex V2 bots and help for AWS providers. This offers a reporting and analytics answer, in addition to a sturdy answer for the continual enhancement and upkeep of the digital assistant ecosystem.
By automating the Check Workbench course of and integrating it with model management and CI/CD processes, Principal was capable of cut back check and deployment occasions, enhance check protection, streamline improvement workflows, and supply a high-quality dialog expertise for patrons. For extra details about different associated providers, see Consider Lex V2 Bot Efficiency Utilizing Check Workbench.
AWS and Amazon will not be affiliated with any of the Principal Monetary Group firms.
This communication is academic in nature and isn’t meant to be taken as a suggestion.
Insurance coverage merchandise issued by Principal Nationwide Life Insurance coverage Co (excluding New York State) and Principal Life Insurance coverage Firm. Plan the federal government providers supplied by Principal Life. Principal Funds, Inc. is distributed by Principal Funds Distributor, Inc. Securities are provided via Principal Securities, Inc., member SIPC and/or impartial dealer/sellers. The referenced firm is a member of Principal Monetary Group, Des Moines, Iowa 50392. ©2025 Principal Monetary Companies, Inc. 4373397-042025
Concerning the writer
Moulay Ahmed He’s a Principal Options Architect with experience in designing advanced enterprise-grade options together with AWS cloud implementations.
caroline lima lane He’s a principal software program engineer with intensive background within the AWS cloud area.

