動画はこちら https://www.youtube.com/watch?v=Gnq0QzTnAx8&t=1991s
大阪リージョンがフルリージョン化して1年が経ちましたが、サーバーレスサービス目線でどんな利用の仕方があるのかを見てみましょう!
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.© 2022, Amazon Web Services, Inc. or its affiliates.大阪リージョンにも使える便利アップデート・サーバーレス 編Kensuke ShimokawaSnr. Serverless Specialist / Amazon Web Services Japan
View Slide
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.Kensuke ShimokawaAmazon Web Services JapanSnr. Serverless Specialist行ったことある場所(抜粋)
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.© 2022, Amazon Web Services, Inc. or its affiliates.マルチリージョン構成で使える便利なアップデート3
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.マルチリージョン構成にどれくらいのコストがかかる?• AWS LambdaとAmazon API Gatewayは、リクエストに対しての課金§ リージョンが複数になってもトラフィックが同じなら2倍課金されるということはない– ※ API Gateway APIコールに対する料金、Lambdaの実行時間に対する料金はリージョンごとに異なります• データベースとファイルの複製保存には追加料金が発生– ※ 完全に冗長なサービス構成の場合、コストが2倍になることも• データ転送 (アウト)のコストはリージョンによって異なる4
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.マルチリージョン Active / Active アーキテクチャ6TokyoAWS CloudクライアントAmazon Route 53AmazonAPI GatewayAWS Lambda Amazon DynamoDBOsakaAmazon DynamoDBグローバルテーブルレプリケーションAmazonAPI GatewayAWS LambdaRouting• レイテンシー• フェイルオーバー
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.マルチリージョン デプロイメント7TokyoAWS CloudクライアントAmazon Route 53AmazonAPI GatewayAWS LambdaOsakaAmazonAPI GatewayAWS LambdaAmazon ECRContainerImageDeployAmazon ECRContainerImageDeployリポジトリ連携どうする?
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.Amazon ECR Cross Region Replication (CRR)• プライベートリポジトリのクロスリージョンレプリケーションが可能に• クロスアカウントのレプリケーションも可能§ 複数リージョン・複数アカウントをターゲットに設定できる§ クロスアカウントの場合、ターゲット側でアクセス許可をする必要あり• レジストリ単位でレプリケーションを設定• 東京、大阪を含む、ECR をサポートする全パブリックリージョンで利用可能9NEW
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.クロスリージョン リポジトリレプリケーション10TokyoAWS CloudクライアントAmazon Route 53AmazonAPI GatewayAWS LambdaOsakaAmazonAPI GatewayAWS LambdaAmazon ECRContainerImageDeployAmazon ECRContainerImageDeployContainerImage
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.© 2022, Amazon Web Services, Inc. or its affiliates.プライベート構成で使える便利なアップデート14
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.PrivateLink を経由で、リージョンサービスにアクセス15AWS CloudAWS Direct ConnectAWS Site-to-Site VPNCorporatedata centerVPCPrivate subnetVirtual PrivateGatewayVPC Endpoints AWSPrivateLinkOsakaAmazon SQS
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.VPCPrivate subnetOsakaPrivateLink 未対応サービスにアクセス?16AWS CloudAWS Direct ConnectAWS Site-to-Site VPNCorporatedata centerVirtual PrivateGatewayVPC Endpoints AWSPrivateLinkAmazon TranscribeAmazon Translateプライベートアクセスどうする?
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.Step Functions が AWS SDK との統合をサポート17AWS Step Functions Express WorkflowsGetSampleVideoGetTranscriptionText• 200+のサービス、9000+の APIアクションを新たにサポート• カスタムコードの記述不要で、SDK で提供されている API を呼び出せる• ASL 組み込み関数を使ってデータを変換することができる• ほとんどの場合 IAM ポリシーは自動生成されないので、明示的に追加する必要があるポイントAWS SDKサポートされているサービス一覧https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.htmlStartTextTranslationStartTranscriptionJobAmazon TranscribeAmazon Translates3:copyObjecttranscribe:startTranscriptionJobs3:getObjecttranslate:translateTextStartEndNEW
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.同期Expressワークフロー が PrivateLink に対応• パブリックインターネットを経由せずに、PrivateLink を介してVPCから同期Expressワークフローを開始可能• AWS SDK 統合を利用することで、AWS の200種類以上のサービスに、Step Functions のPrivateLink を介してVPCからアクセス可能• PrivateLink 未対応サービスに対して、Step Functions AWS SDK 統合経由でアクセス18NEW
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.VPCPrivate subnetOsaka同期Expressワークフロー が PrivateLink に対応19AWS CloudAWS Direct ConnectAWS Site-to-Site VPNCorporatedata centerVirtual PrivateGatewayVPC Endpoints AWSPrivateLinkAWSStep Functions同期 ExpressワークフローAmazon TranscribeAmazon TranslateAWS SDK• Round Trip 回数削減• データ集約
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.まとめ• サーバーレスサービスなら、マルチリージョン Active/Active 構成でもコスト効率が良い• ECRのクロスリージョンレプリケーション対応でリリース運用改善• 大阪リージョンで PrivateLink 未対応のサービスは Step Functions経由での代替検討も20
OSAKA REGION 1 YEAR ANNIVERSARY© 2022, Amazon Web Services, Inc. or its affiliates.Thank you!© 2022, Amazon Web Services, Inc. or its affiliates. 21Kensuke ShimokawaSnr. Serverless Specialist / Amazon Web Services Japan