Upgrade to Pro — share decks privately, control downloads, hide ads and more …

サーバーレスの最新機能で実装する AI 時代のAPI

Avatar for yuyeah yuyeah
December 17, 2025
290

サーバーレスの最新機能で実装する AI 時代のAPI

Avatar for yuyeah

yuyeah

December 17, 2025
Tweet

Transcript

  1. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. サーバーレスの最新機能で 実装する AI 時代のAPI 松本 侑也 Solutions Architect 2025/12/17 〜もっと⼿軽に、セキュアに、コスト最適に〜
  2. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ⾃⼰紹介 松本 侑也 アマゾンウェブサービスジャパン ソリューションアーキテクト 普段は公共のお客様を中⼼にご⽀援しています。 関⻄によく⾏きます 好きな AWS サービス Amazon API Gateway 2
  3. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. 今年はどんなアプリケーションを 実装しましたか︖ 3
  4. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. 4 本⽇のテーマ マルチテナント SaaS エンタープライズ セキュリティ ⽣成 AI の機能実装
  5. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 5 Demo – 検索 + ⽣成 AI による要約アプリ
  6. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 6 今、AWS で実装するとしたら··· Amazon Bedrock AgentCore AWS Lambda Amazon ECS etc··· 複数の選択肢がありますが、 Amazon API Gateway x AWS Lambda での 実装を想定してアップデートをご紹介していきます。
  7. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 7 API Gateway x Lambda で実現すると··· Amazon CloudFront Amazon S3 Amazon API Gateway Amazon Bedrock Amazon S3 Vectors Amazon Bedrock Knowledge Bases /chat /search
  8. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 8 ⽣成 AI 機能を持つ API のサーバーレス構成例 Amazon CloudFront Amazon S3 Amazon API Gateway Amazon Bedrock Amazon S3 Vectors Amazon Bedrock Knowledge Bases /chat /search 今⽇はここの部分にフォーカス
  9. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. 9 本⽇のテーマ マルチテナント SaaS エンタープライズ セキュリティ ⽣成 AI の機能実装
  10. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 10 AI 時代のアプリケーション体験といえば タイピングするように⽣成 AI の出⼒を画⾯に表⽰し、待ち時間を低減 Response Streaming を使ってTime to First Byte (TTFB) を短くし、ユーザー体験を向上 バッファード ストリーム
  11. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 11 API Gateway で Response Streaming が 利⽤可能に • レスポンス転送モードで「ストリーム」 を指定 • タイムアウトは 15 分まで指定可能 • リージョナル、プライベート、エッジ最 適化エンドポイント全てで利⽤可能 • HTTP_PROXY 統合、Lambda 統合(プ ロキシモード)、およびプライベート統 合 (ALB & NLB) で利⽤可能
  12. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 12 REST API integration with ALB ALB in addition to NLB Works with all REST API endpoint types Network Load Balancer (NLB) VPC Link Application Load Balancer (ALB) API Gateway Virtual private cloud (VPC)
  13. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 13 ⽣成 AI 機能を持つ API のサーバーレス構成例 Amazon API Gateway Amazon Bedrock Amazon S3 Vectors Amazon Bedrock Knowledge Bases /chat /search 再掲
  14. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon S3 Vectors がスケールと パフォーマンスを向上させて⼀般提供開始 14 ⼀ 般 利 ⽤ 開 始 • Amazon S3 Vectorsの機能強化と⼀般利⽤開始を発表 • インデックスあたり最⼤20億ベクトルを処理可能 に(プレビュー時の40倍) • バケットあたり最⼤20兆ベクトルを格納可能に • 頻繁に実⾏されるクエリの性能を2-3倍に向上 (100ms 以内) • 他の⼀般的なソリューション⽐で最⼤90%のコス トを削減し、AIアプリケーション開発に取り組むお 客様のオーバーヘッドを最⼩化 • 東京を含む14のリージョンでご利⽤可能
  15. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 15 ⽣成 AI 機能を持つ API のサーバーレス構成例 Amazon API Gateway Amazon Bedrock Amazon S3 Vectors Amazon Bedrock Knowledge Bases /chat /search 再掲
  16. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 16 API を MCP として提供したい場合··· MCP Server AI エージェント Amazon API Gateway Amazon Bedrock Amazon S3 Vectors Amazon Bedrock Knowledge Bases /chat /search
  17. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 17 API Gateway MCP Integration AgentCore Gateway の Target に API Gateway REST API を設定することが可能に。 参考: amazon-bedrock-agentcore-samples
  18. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 18 設定⽅法 • API オペレーションを個別に選択して AgentCore Gateway のターゲットへ追加 • API Gateway 側で Operation Name の指定・または MCP Tool 名を上書き AgentCore Gateway 管理コンソール MCP Inspector による動作確認 MCP Tool としての名前・説明を 上書き可能
  19. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 19 Demo - API Gateway MCP Integration
  20. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. 20 本⽇のテーマ マルチテナント SaaS エンタープライズ セキュリティ ⽣成 AI の機能実装
  21. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 21 SaaS モデルで提供したい場合 ビジネス要件 技術要件 • テナントを分離したい • ノイジーネイバーを避けたい • より早く機能追加したい • 競合に先んじたい
  22. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 22 Lambda の仕組み Worker Host EC2 Bare Metal Instance Host OS Host Kernel KVM Firecracker microVM Firecracker microVM Firecracker microVM Firecracker microVM MicroVM Execution Environment Guest Kernel Runtime Extensions Function Code
  23. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 23 Lambda の分離境界 Execution environment Execution environment Execution environment Execution environment Execution environment Execution environment Execution environment Execution environment Execution environment Execution environment Execution environment Execution environment Function A Function B Function C
  24. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 24 Lambda の同時実⾏を理解する 1 2 3 4 5 6 7 8 9 多くのリクエストが来た場合、複数の実⾏環境でリクエストが処理される。 MicroVM MicroVM MicroVM
  25. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 25 Lambda の同時実⾏を理解する 1 2 3 4 5 6 7 8 9 多くのリクエストが来た場合、複数の実⾏環境でリクエストが処理される。 MicroVM MicroVM MicroVM
  26. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 26 Lambda の同時実⾏を理解する 1 2 3 4 5 6 7 8 9 多くのリクエストが来た場合、複数の実⾏環境でリクエストが処理される。 MicroVM MicroVM MicroVM
  27. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 27 Lambda の同時実⾏を理解する 複数のテナントからリクエストが来た場合、 複数の実⾏環境でリクエストが処理される。 1 2 3 4 5 6 7 8 9 MicroVM MicroVM MicroVM
  28. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 28 マルチテナントで Lambda を使う場合の考慮点 テナント Lambda function Execution environment (run function code, process data that belongs to the blue tenant)
  29. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 29 マルチテナントで Lambda を使う場合の考慮点 テナント Lambda function Execution environment (run function code, process data that belongs to the green tenant)
  30. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 30 マルチテナントで Lambda を使う場合の考慮点 テナント Lambda function Execution environment (run function code, process data that belongs to the yellow tenant)
  31. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 31 マルチテナントで Lambda を使う場合の考慮点 Lambda 特有の課題という訳ではなく、1 つの Compute 環境を複数のテナントで 利⽤する場合は起こり得る テナント Lambda function Execution environment (run function code, process data that belongs to the green tenant) 実⾏環境に副作⽤を与えるプログラムが書かれて いた場合、他のテナントのリクエストに影響を 与える可能性がある
  32. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 32 Lambda Tenant Isolation Mode の発表 テナント Lambda function テナントごとの 実⾏環境 実⾏環境 実⾏環境 実⾏環境 tenantId tenantId tenantId
  33. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 33 Tenant Isolation の Lambda 関数を作成する マネジメントコンソールで「テナント分離モード」 にチェックを⼊れる (後から変更できない点に注意) tenant-id を含めて Lambda 関数を呼び出し
  34. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 34 API Gateway から Tenant Isolation Lambda の 呼び出し X-Amz-Tenant-Id x-tenant-id 統合リクエスト メソッドリクエスト クライアントのリクエストを Lambda が期待する X-Amz-Tenant-Id ヘッダーにマッピングするように設定 参考: Invoking Lambda functions with tenant isolation
  35. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 35 Lambda Authorizer との組み合わせ BlueTenant 実⾏環境 GreenTenant 実⾏環境 API Gateway Authorizer Multi-tenant function { tenantId: “BlueTenant” } JWT HTTP Header: X-Amz-Tenant-Id: BlueTenant
  36. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 36 Demo - API Gateway Tenant Isolation
  37. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 37 特定の API を開発者に提供したい Amazon API Gateway Amazon Bedrock Amazon S3 Vectors Amazon Bedrock Knowledge Bases /chat /search Developer
  38. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 38 API Gateway Developer Portals • フルマネージド型で API ゲートウェイと統合 • REST API* が⾃動的に同期され、 インポート/エクスポートを⾏う 必要はない • マルチアカウントサポート • DNS とポータルのカスタム (ロゴ、 カスタムページ) のカスタマイズ * HTTP API/Web Socket は未対応
  39. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 39 Demo – API Gateway Developer Portal
  40. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. 40 本⽇のテーマ マルチテナント SaaS エンタープライズ セキュリティ ⽣成 AI の機能実装
  41. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 41 作ったアプリケーションを広く使ってもらおうと した場合··· • 業界に準じたセキュリティガイドラインへの準拠 • IPA TLS 暗号設定ガイドライン: 「⾼セキュリティ型」への準拠
  42. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 42 Enhanced TLS Ciphers and Version • エンドポイントとカスタムドメインへの TLS セキュリティポリシーの設定 • 新しいポリシー - Minimum TLS 1.3 - Perfect Forward Secrecy (PFS) - Federal Information Processing Standard (FIPS) - Post Quantum Cryptography (PQC)
  43. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 43 具体的な例 オープンなネットワークにおいて、IPsec による VPN 接続等を利⽤せず HTTPS を利⽤する場合、TLS の プロトコルバージョンを TLS1.3 以上に限定した上で、クライアント証明書を利⽤した TLS クライアント 認証を実施すること。 医療情報ガイドラインをクラウド上で実践する – ネットワーク編 Part 2 | Amazon Web Services ブログ https://aws.amazon.com/jp/blogs/news/japan-security-guidelines-for-medical-information- systems-2024-network-part2/ 医療情報ガイドラインの例 API Gateway - 管理コンソールでの設定例
  44. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. まとめ 44
  45. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 45 まとめ • 昨今、アプリケーションに求められる要件として、SaaS 化や⽣成 AI が増えて きている • ストリーミングレスポンス・ MCP・テナント分離など、アプリ開発に嬉しい機能 が増えてきた • より⼿軽に、よりコスト最適な形で最新の機能をユーザーへお届けできるように • ⾼度なセキュリティ機能も充実してきており、サーバーレスで 実現できるアプリケーションの幅が広がっている
  46. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Thank you! © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.