Amazon Lexのマルチ開発者CI/CDパイプラインで組織成長を促進
AWSは、複数開発者が関わるAmazon Lexプロジェクトにおける設定競合やデプロイの非効率を解消するため、CDKとIaCを活用したマルチ開発者向けCI/CDパイプラインのベストプラクティスを公開した。
キーポイント
従来の開発手法の課題
単一インスタンスでの手動運用は、複数開発者による並行作業時に設定の競合や上書きが発生し、イテレーションサイクルが遅延するリスクがある。
CI/CDパイプラインの活用
分離された開発環境、自動テスト、自動化されたデプロイパイプラインを導入することで、バージョン管理と検証を効率化し、チームの生産性を向上させる。
IaCとCDKによる実装
AWS Cloud Development Kit (CDK) を用いたInfrastructure as Code (IaC) の採用により、インフラストラクチャの再現性と管理容易性を確保する。
Git リモートリポジトリの設定
既存の origin を削除し、新しいリモートリポジトリを追加することで、開発者が自身のコードをプッシュできる環境を整備する。
マルチ開発者向け CI/CD 基盤の準備
Amazon Lex のマルチ開発者 CI/CD パイプラインを構成する際、個々の開発者が独立して作業できるよう Git の設定を行う必要がある。
マルチ開発者向けCI/CDワークフローの構築
GitLab CI/CDを用いて、開発者が個別のブランチで作業し、マージリクエスト時にエフェメラル環境が自動作成される仕組みを導入することで、並列開発と品質保証を両立させる。
Amazon LexとCDKを用いたローカル環境の同期
AWS CDKで個人用の孤立したアシスタントインスタンスをデプロイし、lexcli.pyツールを使用してLexコンソール上の変更をコードとしてエクスポート・コミットするローカル開発環境を整備する。
影響分析・編集コメントを表示
影響分析
本記事は、Amazon Lexを用いたエンタープライズ規模の会話型AI開発における「運用負荷」と「品質保証」の課題に対する具体的な解決策を示している。特に、単一開発者向けではなく「マルチ開発者」環境を想定したCI/CD設計は、実際の現場でのスケーラビリティ確保に直結する実用的な知見を提供しており、AWSエコシステム内の開発者にとって即座に適用可能なベストプラクティスとして評価できる。
編集コメント
単なるツールの紹介ではなく、チーム開発における具体的な競合リスクと、それを解決するIaCによる実装手法に焦点を当てており、現場のエンジニアにとって非常に参考になる実践的なガイドである。
プロジェクトディレクトリに移動
cd sample-lex-multi-developer-cicd
元のリモートを削除し、独自のものを追加
git remote remove origin
git remote add origin
新しいリポジトリにプッシュ
git push -u origin main
- GitLab CI/CDの変数を設定するには、GitLabプロジェクトに移動し、「設定」を選択します。次に「CI/CD」→「変数」を選択し、以下の変数を追加します:
• AWS_REGION に us-east-1 を入力
• AWS_DEFAULT_REGION に us-east-1 を入力
• アプリケーションが必要とするその他の環境固有のシークレットを追加
- メインブランチを保護するためにブランチ保護ルールを設定します。適切なワークフローを適用することで、本番コードへの直接コミットを防ぎます。
AWS認証設定
パイプラインが環境内でAWS CDK (Cloud Development Kit) の変更をデプロイするには、適切な権限が必要です。これは、パイプライン内で特定のIAM (Identity and Access Management) ロールを引き受ける、IAMロールが付与されたホスト型ランナーを使用する、または別の承認されたアクセス方法を有効にするなど、さまざまな方法で実現できます。正確な設定は、組織のセキュリティとアクセス管理の方針に依存します。これらの権限の詳細な構成は本投稿の範囲外ですが、CDKデプロイメントを実行するためにランナーとロールを適切に承認することが不可欠です。
ローカル開発環境
ローカル開発環境を設定するには、以下の手順を完了します:
- 依存関係をインストール
pip install -r requirements.txt
- 個人用アシスタント環境をデプロイ:
cdk deploy -c environment=your-username --outputs-file ./cdk-outputs.json
これにより、独立した変更を行うための分離されたアシスタントインスタンスが作成されます。
開発ワークフロー
開発ワークフローは以下の手順で行います:
- フィーチャーブランチを作成:
git checkout -b feature/your-feature-name
- アシスタントの変更を行います:
a. Amazon Lexコンソールで個人用アシスタントにアクセス
b. 必要に応じてインテント、スロット、またはアシスタント構成を変更
c. コンソールで直接変更をテスト
- 変更をコードにエクスポート:
python lexcli.py export your-username
このツールは、エクスポートする変更を対話形式で選択するよう促し、意図した変更のみをコミットできるようにします。
- 変更をレビューしてコミット:
git add .
git commit -m "feat: add new intent for booking flow"
git push origin feature/your-feature-name
CI/CDパイプラインの実行
CI/CDパイプラインの実行は以下の流れです:
- マージリクエストを作成 – パイプラインがブランチ用の一時的な環境を自動的に作成
- 自動テスト – パイプラインが変更に対して包括的なテストを実行
- コードレビュー – チームメンバーがコード変更とテスト結果の両方をレビュー
- メインにマージ – 変更が承認されるとマージされ、開発環境に自動デプロイ
- 環境プロモーション – 手動承認ゲートにより、QA (品質保証) および本番環境へのプロモーションを制御
次のステップ
このマルチ開発者パイプラインを実装した後は、以下の次のステップを検討してください:
• テストを拡張 – インテント検証のためのより包括的なテストスイートを追加
• 監視を強化 – アシスタントパフォーマンスのためのAmazon CloudWatchダッシュボードを統合
• ハイブリッドAIを探索 – Amazon LexとAmazon Bedrockを組み合わせ、生成AI (Generative AI) 機能を実現
Amazon Lexの詳細については、Amazon Lex開発者ガイドを参照してください。
結論
本投稿では、Amazon Lex向けのマルチ開発者CI/CDパイプラインを実装することが、会話型AI開発における重要な運用課題に対処する方法を示しました。分離された開発環境、ローカルテスト機能、自動化された検証ワークフローを提供することで、チームは品質を犠牲にすることなく並行作業が可能になり、複雑な会話型AIソリューションの市場投入までの時間を短縮できます。
GitHubリポジトリで公開されているAWS CDKプロトタイプとAmazon Lex CLIツールを使用して、このアプローチの実装を今日から開始できます。会話型AI機能をさらに強化したい組織は、構造化された対話管理と大規模言語モデル (LLMs) の両方を活用したハイブリッドソリューションとして、Amazon BedrockとのAmazon Lex統合を検討してください。
このソリューションを実装した経験についてお聞かせください。コメントでフィードバックを共有するか、実装ガイダンスのためにAWSプロフェッショナルサービスにお問い合わせください。
著者について
Grazia Russo Lassner
原文を表示
As your conversational AI initiatives evolve, developing Amazon Lex assistants becomes increasingly complex. Multiple developers working on the same shared Lex instance leads to configuration conflicts, overwritten changes, and slower iteration cycles. Scaling Amazon Lex development requires isolated environments, version control, and automated deployment pipelines. By adopting well-structured continuous integration and continuous delivery (CI/CD) practices, organizations can reduce development bottlenecks, accelerate innovation, and deliver smoother intelligent conversational experiences powered by Amazon Lex.
In this post, we walk through a multi-developer CI/CD pipeline for Amazon Lex that enables isolated development environments, automated testing, and streamlined deployments. We show you how to set up the solution and share real-world results from teams using this approach.
Transforming development through scalable CI/CD practices
Traditional approaches to Amazon Lex development often rely on single-instance setups and manual workflows. While these methods work for small, single-developer projects, they can introduce friction when multiple developers need to work in parallel, leading to slower iteration cycles and higher operational overhead. A modern multi-developer CI/CD pipeline changes this dynamic by enabling automated validation, streamlined deployment, and intelligent version control. The pipeline minimizes configuration conflicts, improves resource utilization, and empowers teams to deliver new features faster and more reliably. With continuous integration and delivery, Amazon Lex developers can focus less on managing processes and more on creating engaging, high-quality conversational AI experiences for customers. Let’s explore how this solution works.
Solution architecture
The multi-developer CI/CD pipeline transforms Amazon Lex from a limited, single-user development tool into an enterprise-grade conversational AI platform. This approach addresses the fundamental collaboration challenges that slow down conversational AI development. The following diagram illustrates the multi-developer CI/CD pipeline architecture:

Using infrastructure as code (IaC) with AWS Cloud Development Kit (AWS CDK), each developer runs cdk deploy to provision their own dedicated Lex assistant and AWS Lambda instances in a shared Amazon Web Services (AWS) account. This approach eliminates the overwriting issues common in traditional Amazon Lex development and enables true parallel work streams with full version control capabilities.
Developers use lexcli, a custom AWS Command Line Interface (AWS CLI) tool, to export Lex assistant configurations from the shared AWS account to their local workstations for editing. Developers then test and debug locally using lex_emulator, a custom tool providing integrated testing for both assistant configurations and AWS Lambda functions with real-time validation to catch issues before they reach cloud environments. This local capability transforms the development experience by providing immediate feedback and reducing the need for time-consuming cloud deployments during iterations.
When developers push changes to version control, this pipeline automatically deploys ephemeral test environments for each merge request through GitLab CI/CD. The pipeline runs in Docker containers, providing a consistent build environment that ensures reliable Lambda function packaging and reproducible deployments. Automated tests run against these temporary stacks, and merges are only enabled if all tests are successful. Ephemeral environments are automatically destroyed after merge, ensuring cost efficiency while maintaining quality gates. Failed tests block merges and notify developers, preventing broken code from reaching shared environments.
Changes that pass testing in ephemeral environments are promoted to shared environments (Development, QA, and Production) with manual approval gates between stages. This structured approach maintains high-quality standards while accelerating the delivery process, enabling teams to deploy new features and improvements with confidence.
The following graphic illustrates the developer workflow organized by phases: local development, version control, and automated deployment. Developers work in isolated environments before changes flow through the CI/CD pipeline to shared environments.

Business Impact
By enabling parallel development workflows, this solution delivers substantial time and efficiency improvements for conversational AI teams. Internal evaluations show teams can parallelize much of their development work, driving measurable productivity gains. Results vary based on team size, project scope, and implementation approach, but some teams have reduced development cycles significantly. The acceleration has enabled teams to deliver features in weeks rather than months, improving time-to-market. The time savings allow teams to handle larger workloads within existing development cycles, freeing capacity for innovation and quality improvement.
Real-world success stories
This multi-developer CI/CD pipeline for Amazon Lex has supported enterprise teams in improving their development efficiency. One organization used it to migrate their platform to Amazon Lex, enabling multiple developers to collaborate concurrently without conflicts. Isolated environments and automated merge capabilities helped maintain consistent progress during complex development efforts.
A large enterprise adopted the pipeline as part of its broader AI strategy. By using validation and collaboration features within the CI/CD process, their teams enhanced coordination and accountability across environments. These examples illustrate how structured workflows can contribute to improved efficiency, smoother migrations, and reduced rework.
Overall, these experiences demonstrate how the multi-developer CI/CD pipeline helps organizations of varying scales strengthen their conversational AI initiatives while maintaining consistent quality and development velocity.
See the solution in action
To better understand how the multi-developer CI/CD pipeline works in practice, watch this demonstration video that walks through the key workflows. It shows how developers work in parallel on the same Amazon Lex assistant, resolve conflicts automatically, and deploy changes through the pipeline.
Getting started with the solution
The multi-developer CI/CD pipeline for Amazon Lex is available as an open source solution through our GitHub repository. Standard AWS service charges apply for the resources you deploy.
Prerequisites and environment setup
To follow along with this walkthrough, you need:
- NodeJS 22.9.0 or later
- AWS Cloud Development Kit 2.176.0 or later (AWS CDK)
- Python 3.12.8 or later
- Docker (required for AWS CDK to bundle Python Lambda functions)
- An AWS account with permissions to create Amazon Lex assistants, Lambda functions, and AWS Identity and Access Management (IAM) roles
Core components and architecture
The framework consists of several key components that work together to enable collaborative development: infrastructure-as-code with AWS CDK, the Amazon Lex CLI tool called lexcli, and the GitLab CI/CD pipeline configuration.
The solution uses AWS CDK to define infrastructure components as code, including:
- Individual Amazon Lex instances for each developer
- Lambda functions for fulfillment logic
- Amazon CloudWatch logging and monitoring
- Amazon Simple Storage Service (Amazon S3) buckets for configuration storage
Deploy each developer’s environment using:
cdk deploy -c environment=your-username --outputs-file ./cdk-outputs.jsonThis creates a complete, isolated environment that mirrors the shared configuration but allows for independent modifications.
The lexcli tool exports Amazon Lex assistant configuration from the console into version-controlled JSON files. When invoking lexcli export , it will:
- Connect to your deployed assistant using the Amazon Lex API
- Download the complete assistant configuration as a .zip file
- Extract and standardize identifiers to make configurations environment-agnostic
- Format JSON files for review during merge requests
- Provide interactive prompts to selectively export only changed intents and slots
This tool transforms the manual, error-prone process of copying assistant configurations into an automated, reliable workflow that maintains configuration integrity across environments.
The .gitlab-ci.yml file orchestrates the entire development workflow:
- Ephemeral environment creation – Automatically creates and destroys a temporary dynamic environment for each merge request.
- Automated testing – Runs comprehensive tests including intent validation, slot verification, and performance benchmarks
- Quality gates – Enforces code linting and automated testing with 40% minimum coverage; requires manual approval for all environment deployments
- Environment promotion – Enables controlled deployment progression through dev, staging, production with manual approval at each stage
The pipeline ensures only validated, tested changes progress through deployment stages, maintaining quality while enabling rapid iteration.
Step-by-step implementation guide
To create a multi-developer CI/CD pipeline for Amazon Lex, complete the steps in the following sections. Implementation follows five phases:
- Repository and GitLab setup
- AWS authentication setup
- Local development environment
- Development workflow
- CI/CD pipeline execution
Repository and GitLab setup
To set up your repository and configure GitLab variables, follow these steps:
- Clone the sample repository and create your own project:
# Clone the sample repository
git clone https://gitlab.aws.dev/lex/sample-lex-multi-developer-cicd.git
# Navigate to the project directory
cd sample-lex-multi-developer-cicd
# Remove the original remote and add your own
git remote remove origin
git remote add origin
# Push to your new repository
git push -u origin main- To configure GitLab CI/CD variables, navigate to your GitLab project and choose Settings. Then choose CI/CD and Variables. Add the following variables:
For AWS_REGION, enter us-east-1
- For AWS_DEFAULT_REGION, enter us-east-1
- Add the other environment-specific secrets your application requires
- Set up branch protection rules to protect your main branch. Proper workflow enforcement prevents direct commits to the production code.
AWS authentication setup
The pipeline requires appropriate permissions to deploy AWS CDK changes within your environment. This can be achieved through various methods, such as assuming a specific IAM role within the pipeline, using a hosted runner with an attached IAM role, or enabling another approved form of access. The exact setup depends on your organization’s security and access management practices. The detailed configuration of these permissions is outside the scope of this post, but it’s essential to properly authorize your runners and roles to perform CDK deployments.
Local development environment
To set up your local development environment, complete the following steps:
- Install dependencies
pip install -r requirements.txt- Deploy your personal assistant environment:
cdk deploy -c environment=your-username --outputs-file ./cdk-outputs.jsonThis creates your isolated assistant instance for independent modifications.
Development workflow
To create the development workflow, complete the following steps:
- Create a feature branch:
git checkout -b feature/your-feature-name- To make assistant modifications, follow these steps:
Access your personal assistant in the Amazon Lex console
- Modify intents, slots, or assistant configurations as needed
- Test your changes directly in the console
- Export changes to code:
python lexcli.py export your-usernameThe tool will interactively prompt you to select which changes to export so you only commit the modifications you intended.
- Review and commit changes:
git add .
git commit -m "feat: add new intent for booking flow"
git push origin feature/your-feature-nameCI/CD pipeline execution
To execute the CI/CD pipeline, complete the following steps:
- Create merge request – The pipeline automatically creates an ephemeral environment for your branch
- Automated testing – The pipeline runs comprehensive tests against your changes
- Code review – Team members can review both the code changes and test results
- Merge to main – After the changes are approved, they’re merged and automatically deployed to development
- Environment promotion – Manual approval gates control promotion to QA and production
What’s next?
After implementing this multi-developer pipeline, consider these next steps:
- Scale your testing – Add more comprehensive test suites for intent validation
- Enhance monitoring – Integrate Amazon CloudWatch dashboards for assistant performance
- Explore hybrid AI – Combine Amazon Lex with Amazon Bedrock for generative AI capabilities
For more information about Amazon Lex, refer to the Amazon Lex Developer Guide.
Conclusion
In this post, we showed how implementing multi-developer CI/CD pipelines for Amazon Lex addresses critical operational challenges in conversational AI development. By enabling isolated development environments, local testing capabilities, and automated validation workflows, teams can work in parallel without sacrificing quality, helping to accelerate time-to-market for complex conversational AI solutions.
You can start implementing this approach today using the AWS CDK prototype and Amazon Lex CLI tool available in our GitHub repository. For organizations looking to enhance their conversational AI capabilities further, consider exploring the Amazon Lex integration with Amazon Bedrock for hybrid solutions using both structured dialog management and large language models (LLMs).
We’d love to hear about your experience implementing this solution. Share your feedback in the comments or reach out to AWS Professional Services for implementation guidance.
About the authors
<img loading="lazy" class="alignnone size-full wp-image-49844" src="https://d2908q01vomqb2.cloudfront.net/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59/2026/02/25/ML-12091-grazia-1.png" alt="Grazia Russo Lassner" width="100" heig
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み