Slide 1

Slide 1 text

© 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 〜もっと⼿軽に、セキュアに、コスト最適に〜

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

© 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 の機能実装

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

© 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 での 実装を想定してアップデートをご紹介していきます。

Slide 7

Slide 7 text

© 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

Slide 8

Slide 8 text

© 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 今⽇はここの部分にフォーカス

Slide 9

Slide 9 text

© 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 の機能実装

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

© 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)

Slide 13

Slide 13 text

© 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 再掲

Slide 14

Slide 14 text

© 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のリージョンでご利⽤可能

Slide 15

Slide 15 text

© 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 再掲

Slide 16

Slide 16 text

© 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

Slide 17

Slide 17 text

© 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

Slide 18

Slide 18 text

© 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 としての名前・説明を 上書き可能

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

© 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 の機能実装

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

© 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

Slide 23

Slide 23 text

© 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

Slide 24

Slide 24 text

© 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

Slide 25

Slide 25 text

© 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

Slide 26

Slide 26 text

© 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

Slide 27

Slide 27 text

© 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

Slide 28

Slide 28 text

© 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)

Slide 29

Slide 29 text

© 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)

Slide 30

Slide 30 text

© 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)

Slide 31

Slide 31 text

© 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) 実⾏環境に副作⽤を与えるプログラムが書かれて いた場合、他のテナントのリクエストに影響を 与える可能性がある

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

© 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

Slide 35

Slide 35 text

© 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

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

© 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

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

© 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 の機能実装

Slide 41

Slide 41 text

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

Slide 42

Slide 42 text

© 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)

Slide 43

Slide 43 text

© 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 - 管理コンソールでの設定例

Slide 44

Slide 44 text

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

Slide 45

Slide 45 text

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

Slide 46

Slide 46 text

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