メインコンテンツに移動
代表的なユースケースを実績ある実装形から

形で考えるサーバーレス設計

やりたいこと(ユースケース)からそれを実現する典型的な基本構成(パターン)へ逆引きできるように、ユースケース主導で紹介。各AWSサービスの機能をすべて理解していなくても、実績ある形から始められます。そして、その基本構成を組み合わせてアプリケーション全体の設計へと展開できます。

1. オンラインリクエスト処理

動的 Web / モバイルバックエンド

注文入力フォーム、アンケート、シンプルな検索からカジュアルなゲームまで、サーバーレス型で実装する典型的な形です。

Diagram showing data flow from Amazon API Gateway to AWS Lambda, and then to Amazon DynamoDB, with bidirectional arrows between each component.

業務 API、グループ企業間 API

既存のデータを使って API で連携。外部からの予測外の負荷から DB を保護し、セキュアな連携を行います。

Diagram showing data flow from Amazon API Gateway to a VPC containing AWS Lambda, compute resources, and Amazon RDS.

Push 型配信/通知、対話型 API

Push型で情報配信を行う WebSocket ユースケースで選択される形です。

Missing alt text value

アプリ内処理フロー、BFF

アプリケーション内の処理フローをビジュアルに管理し、個々の処理ロジックと連携したりエラー処理を行います。

Diagram showing a flow from Amazon API Gateway through Lambda functions and control logic to external APIs and databases, labeled in Japanese.

2. 加工処理、機能連携

画像処理/シンプルなデータ加工

アップロードされた画像ファイルのサムネイル化、データファイルを取得して加工処理するなどの要件をサーバーを起動しっぱなしで構えるのではなく、サーバーレス型で構成できます。

Diagram showing the integration pattern between Amazon S3 and AWS Lambda for processing tasks. Includes S3 bucket and Lambda function icons, with arrows and Japanese text describing processing such as image compression, resizing, numeric calculations, and text conversion.

スケジュールジョブ/CRON

定期的なタスク実行やシステムのアラートを受けて処理を起動する要件をサーバーを起動しっぱなしで構えるのではなく、サーバーレス型で構成できます。

Missing alt text value

イベント駆動の業務機能連携

機能内の処理ブロック間の依存性をキューなどで分割する構造はサーバー配置型ではサイジングが複雑になりますが、サーバーレス型ならその難しさが軽減されます。

Diagram showing a workflow with "処理1" (Process 1) sending data to an SNS topic, which connects to an SQS queue and a Lambda function, leading to "処理2" (Process 2).

サービス/SaaS 連携、パイプ処理

異なる業務処理の間の連携、外部 SaaS との連携など、異なるドメインの処理を連携します。非同期型の連携はサーバーを起動しっぱなしで構えるのではなく、サーバーレス型で構成すると効率的です。

Alt-text: Diagram showing SaaS applications sending events to Amazon EventBridge, which routes them to AWS services like Lambda, Step Functions, and API Gateway.

3. データイベント処理

IoT バックエンド

増加する IoT デバイスからのイベントを受信し対処する仕組みはサーバーレスが広く利用されるユースケースです。

Diagram showing data flow from AWS IoT Core to AWS Lambda, and then to Amazon DynamoDB.

チャットボット、Alexa スキル

チャットボットは、利用者からの指令イベントを受けて処理が起動される典型的なイベント駆動処理です。

Diagram showing a flow of data between a database, users, an API gateway, a Lambda function, and a box labeled "実装リソース" (implementation resources) in Japanese.

流入データの連続処理

アドストリーム、ロケーションデータ、バイタルデータなどの連続的な流入データの処理のための構成です。

Diagram showing data flow from Amazon Kinesis Data Streams to AWS Lambda, then to an Amazon S3 bucket.

データ変更トリガー処理

データベースに対して行われるデータ変更(挿入、更新、削除)をきっかけとして処理を起動します。

Alt-text: Diagram showing data flow from Amazon DynamoDB to AWS Lambda, which then routes to Amazon RDS and an external call labeled in Japanese (外部コール).

4. バックエンド処理

大量データ処理の並列実行

CSV、JSON ファイルを DB にロードする処理は業務のさまざまな場面で存在します。数万、数十万、数百万といった行数でも、処理を並列実行させて処理時間を短縮できます。

Diagram showing data flow from an AWS S3 bucket through AWS Lambda functions for processing, then back to another S3 bucket.

ログデータ収集処理

稼働ログ、イベントログを処理し、モニタリングしたり、異常検知する場面でも利用され、カスタムの SIEM として利用される企業もいます。

A diagram showing the AWS serverless log collection pattern using Amazon Kinesis Data Firehose, AWS Lambda functions, and Amazon S3 for log data processing and storage.

業務/承認ワークフロー

業務に対する承認処理を管理するワークフローとして実装するエンジンとして利用するパターンです。

Diagram illustrating a flow control system with email processing, Lambda functions, database interaction, and user communication, labeled in Japanese.

バッチ / ETL の一連の処理フロー

業務と業務の間でデータ転送・加工/変換・集計処理といった、いわゆるバッチ処理は、サーバーレス化することで、バッチサーバーの規模や性能から解放され、サーバーリソースの空き状況をスケジュール管理する必要がなくなります。

Alt-text: Diagram showing an Amazon EventBridge workflow with options for flow control, Lambda functions, S3 bucket, data processing, and storage, ending in a connected node structure.

5. AI/機械学習 + サーバーレス

AI サービスのオーケストレーション

ユーザーリクエストと AI エンジンをつなぐ、入り口となる API 実装やプロンプト加工処理。こうした新規領域はサーバーレスの土壌です。

Alt-text: Diagram showing data flow to an AI service, with flow control and stream-based responses labeled in Japanese.

軽量な推論処理の実行基盤

推論処理も軽量なものはサーバーレス/Lambda の上で動かせば、費用と運用工数を最適化できます。

Diagram showing a workflow from Amazon SQS to AWS Lambda functions, with some functions highlighted for machine learning tasks, and ending with data storage in Amazon DynamoDB.

機械学習データパイプライン

データを整形処理しながら学習処理へと連携。一連のフローを管理します。途中のタスクで失敗してもそこから再実行をかけられます。

A diagram showing an AWS machine learning pipeline in Japanese, featuring flow control using Step Functions or AWS Glue, Lambda functions, Fargate, SageMaker, AWS Batch, and S3 buckets, with process flow illustrated from data ingestion to machine learning model processing.

AI サービスのエージェント処理

AI 機能を補強するエージェント実装としてもサーバーレスは利用されます。

Diagram showing Amazon Bedrock connecting to agents, which interact with internal systems, external APIs, and business data, labeled in Japanese.