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

[re:Invent 2023 re:cap @serverlesstokyo#19]次世代メッセージングとワークフローサービス 〜Step Functions、EventBridge、SNS、SQSの最新アップデート〜

lbx
January 12, 2024
400

[re:Invent 2023 re:cap @serverlesstokyo#19]次世代メッセージングとワークフローサービス 〜Step Functions、EventBridge、SNS、SQSの最新アップデート〜

lbx

January 12, 2024
Tweet

Transcript

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

    rights reserved. Serverless Meetup Tokyo #19 – AWS re:Invent 2023 re:Cap - Baixiao Lin (@lbx) Amazon Web Services Solutions Architect 次世代メッセージングとワークフローサービス 〜Step Functions、EventBridge、SNS、SQSの最新アップデート〜
  2. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 3 AWS サーバレス スペクトラム AWS は幅広いサーバレスサービスを提供 コンピュート ワークフロー・アプリケーション統合 AWS Lambda AWS Fargate AWS App Runner Amazon EventBridge Amazon SNS Amazon SQS AWS Step Functions AWS AppSync Amazon API Gateway ストレージ Amazon S3 Amazon EFS データベース・アナリティクス Amazon ECS Amazon Aurora Serverless Amazon DynamoDB Amazon OpenSearch Service Amazon Kinesis Amazon QuickSight AWS Glue Amazon Redshift Amazon Bedrock INCLUDES
  3. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. アップデートの何がうれしいか より⾼い 俊敏性 ・より多くのサービスとネイティブ統合できるように → AWS Step Functions・Amazon EventBridge の SaaS との統合 → AWS Step Functions と Bedrock との統合 ・テスト機能やロギング機能などの追加により 運⽤・開発がよりしやすく より良い パフォーマンス ・Amazon SQS FIFO・Amazon SNS FIFOに より⾼いスループット ・SQS-Lambda 構成でのより⾼いスケール速度 Amazon EventBridge Amazon SNS Amazon SQS AWS Step Functions
  4. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 5 より多くのサービスとネイティブ統合できるように - SaaS との統合 1. Amazon EventBridge が Adobe と Stripe とパートナー統合 2. AWS Step Functions が 3rd パーティ API Call に対応 より⾼い 俊敏性
  5. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon EventBridge が Adobe と Stripe と パートナー統合 6 • Adobe と Stripe からのイベントをサポート • 従来のように webhook endpoint を⽴てる必要がなくなり、 Adobe や Stripe との統合がより容易に https://aws.amazon.com/about-aws/whats-new/2023/11/amazon-eventbridge-partner-integrations-adobe-stripe/ 一 般 利 用 開 始
  6. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 7 • Stripe イベントを全てサポート • ただし、Stripe側ではまだプライベートベータ • ユースケース例 ▪ Payment 成功時に発送のためのワ ークフローを実⾏ ▪ サブスクプランアップグレードの際 に⾃動的にアクセス権限を付与 https://aws.amazon.com/about-aws/whats-new/2023/11/amazon-eventbridge-partner-integrations-adobe-stripe/ 一 般 利 用 開 始 Amazon EventBridge が Adobe と Stripe と パートナー統合
  7. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS Step Functions Call 3rd Party APIs • 外部の API Endpoint に対する呼び出し に対応 • EventBridge connections を利⽤し、 Basic・OAuth・API キーによる認証をサ ポート 8 https://docs.aws.amazon.com/step-functions/latest/dg/connect-third-party-apis.html 一 般 利 用 開 始
  8. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 9 一 般 利 用 開 始 AWS Step Functions test state • ステート単体でのテストが可能になりました
  9. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 45+ の パートナー統合 AWS Cloud AWS Lambda Amazon SQS SaaS AWS Step Functions workflow SaaS Amazon EventBridge SaaS アプリケーションとより容易に統合・全体像
  10. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 11 より多くのサービスとネイティブ統合できるように - GenAI サービスとの統合 1. AWS Step Functions が Amazon Bedrock と最適化統合 より⾼い 俊敏性
  11. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS Step Functions と Amazon Bedrock の統合 12 https://aws.amazon.com/jp/blogs/news/build-generative-ai-apps-using-aws-step-functions-and-amazon-bedrock-2/ 一 般 利 用 開 始 GenAI ワークフローの構築が容易に • InvokeModel でモデルの推論 • CreateModelCustomizationJob でモデルのファインチューニン グ
  12. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. InvokeModel の⼊出⼒を S3 URI として指定可能 ※Step Functions の⼊出⼒にサイズの制限(256KB)があるため 13 一 般 利 用 開 始 AWS Step Functions と Amazon Bedrock の統合
  13. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Demo - Step Functions with Bedrock & Call 3rd Party APIs 15 • State Machine が⾏うこと ▪ 天気予報APIを叩く ▪ APIレスポンスを元に、Step Functions の組み込み関数を利⽤し Promptを⽣成、Bedrock上の Claude-v2を呼び出す • デモで⾏うこと ▪ Call 3rd party API でTest Stateを実 ⾏ ▪ State Machine を実⾏し、Bedrock の実⾏結果を確認
  14. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 17 Building for the future サ ー バ レ ス サ ー ビ ス で G E N A I ア プ リ ケ ー シ ョ ン を 構 築 す る Fine-tuning to enhance GenAI performance Inference enrichment Amazon ECS Model fine-tuning Amazon Textract Amazon Transcribe AWS Lambda AWS Step Functions Amazon DynamoDB Amazon S3 Transform image text AWS Lambda Summarize image text Amazon Bedrock Store summary table Amazon S3 Amazon S3 Proprietary FM AWS Step Functions AWS Step Functions AWS Lambda
  15. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 18 運⽤・開発がよりしやすくなった 1. AWS Step Functions test state 機能 2. AWS Step Functions Redrive from failure 3. Amazon EventBridge Pipes がロギング機能追加 4. CloudTrail が Amazon SQS データイベントをサポート より⾼い 俊敏性
  16. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS Step Functions - Redrive from failure • 失敗時点からの再実⾏がサポート • コンソール or RedriveExecution APIから再実⾏ • 再実⾏は元の実⾏に含められ、 実⾏履歴に再実⾏イベントが追加される • Map(Distributed Map), Parallelもサポート 19 https://docs.aws.amazon.com/ja_jp/step-functions/latest/dg/redrive-executions.html 一 般 利 用 開 始
  17. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Redrive from failure – 注意点 • Standard Workflow のみ対応 • 必ず失敗したステートからの再実⾏になる • 再実⾏時に Input の変更不可 • ステートマシーンの編集不可 20 https://docs.aws.amazon.com/ja_jp/step-functions/latest/dg/redrive-executions.html 一 般 利 用 開 始
  18. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 21 一 般 利 用 開 始 Redrive AWS Step Functions - Redrive from failure
  19. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Step Functions Redrive を⾃動実⾏ 24 • EventBridge と連携し、実⾏ 失敗すれば再実⾏させること も可能
  20. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon EventBridge Pipes にロギング機能追加 25 一 般 利 用 開 始
  21. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon EventBridge Pipes にロギング機能追加 - EventBridge Pipes のユースケース例 26 ノーコードで複数の Kinesis Data Streams を統合 SQS と Step Functions の統合 DynamoDB と EventBridge の統合 一 般 利 用 開 始
  22. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon EventBridge Pipes にロギング機能追加 27 • EventBridge Pipes がログを出⼒できるようになった ▪ ログレベルの設定可能︓ERROR・INFO・TRACE ▪ 実⾏データを含むことも可能︓イベントペイロード・AWSリクエスト・ AWSレスポンス https://aws.amazon.com/jp/blogs/compute/introducing-logging-support-for-amazon-eventbridge-pipes/ 一 般 利 用 開 始
  23. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 30 より良いパフォーマンス - スループットの向上 1. Amazon SNS FIFO トピックのスループット上限増加 2. Amazon SQS FIFO キューのスループット上限増加 より良い パフォーマンス
  24. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SNS FIFO トピックのスループット上限引き上げ 31 • スループット上限が300MPSから3KMPSまでに引き上げ • 新しい上限は新規・既存の FIFO トピックに⾃動的に適⽤される https://aws.amazon.com/about-aws/whats-new/2023/11/amazon-sns-fifo-topic-10x-3000-messages-second/ 一 般 利 用 開 始
  25. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SQS FIFO キュー のスループットが上限増加 32 • FIFO キューの⾼スループットモードにおいて、スループットの上 限引き上げ ▪ リージョンによって上限値がことなる – 最⼤70KTPS、東京リージョンでは9KTPS、⼤阪リージョンでは2.4KTPS https://aws.amazon.com/blogs/aws/announcing- throughput-increase-and-dead-letter-queue-redrive- support-for-amazon-sqs-fifo-queues/ 一 般 利 用 開 始
  26. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. SNS FIFO トピック + SQS FIFO キュー の場合 33 一 般 利 用 開 始 • 東京リージョンでは、スループットのボトルネックが SNS になるため、スル ープットの上限が 300 MPSから 3K MPS まで向上 • ⼤阪リージョンでは、SQS のスループットの上限の⽅が低く、実質スループッ ト上限が 2.4K MPS
  27. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 34 より⾼速に 1. Amazon SQS がイベントソースの場合、Lambda のポーリング スケールアップがより⾼速に 2. Amazon SQS が JSON プロトコルをサポート より良い パフォーマンス
  28. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 35 • Lambda 関数の同時実⾏数のスケールアップ速度が 60/min から 300/min へ増加 • SQSのメッセージ数のスパイクにより迅速に対応 • Lambdaが利⽤可能な全リージョンで⾃動適⽤ https://aws.amazon.com/about-aws/whats-new/2023/11/aws-lambda-polling-scale-rate-sqs-event-source/ 一 般 利 用 開 始 before after SQS がイベントソースの場合の Lambda のポーリングスケー ルアップがより⾼速に
  29. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 振り返り より⾼い 俊敏性 ・より多くのサービスとネイティブ統合できるように → AWS Step Functions・Amazon EventBridge の SaaS との統合 → AWS Step Functions と Bedrock との統合 ・テスト機能やロギング機能などの追加により 運⽤・開発がよりしやすく より良い パフォーマンス ・Amazon SQS FIFO・Amazon SNS FIFOに より⾼いスループット ・SQS-Lambda 構成でのより⾼いスケール速度 Amazon EventBridge Amazon SNS Amazon SQS AWS Step Functions
  30. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. The road ahead サ ー バ レ ス ス ペ ト ラ ム を 継 続 的 に 開 発 し お 客 様 の 生 産 性 を 上 げ て ま い り ま す Amazon Confidential AWS Well- Architected fundamentals Developer experience Improved controls over services Simpler and broader integrations