aws lambda...2017/07/19 · コンソール上でlambda関数ポリシーが確認可能に •...
TRANSCRIPT
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Keisuke Nishitani (@Keisuke69)Amazon Web Services Japan K.K.July 19, 2017
AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Who am I
Keisuke NishitaniSpecialist Solutions Architect, ServerlessAmazon Web Service Japan K.K
@Keisuke69 Keisuke69 Keisuke69 Keisuke69Keisuke69x
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
サーバのプロビジョニングや管理が不要
利用量に応じたスケール
アイドル時の支払いは一切なし 組み込まれた可用性と耐障害性
AWS Lambdaとは
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
アプリケーションモデル
イベントソース ファンクション サービスなど
JavaC#Node.jsPython
λイベント
S3にオブジェクトが作られるKinesisにストリームデータが保存されるHTTPSによるリクエストetc...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
内容
• S3にオブジェクト(画像)を保存すると、Lambdaファンクションがサイズを変更してDestinationバケットに保存
• やること- SourceバケットとDestinationバケットの作成- Lambdaファンクションの作成- デプロイパッケージの作成- イベントソースの設定
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
内容
元画像
イベント
1. 画像アップロード2. 画像サイズ変更 3. 変更後画像の保存
Sourceバケット DestinationバケットLambda
ファンクション
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
直近のアップデート
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
コンソール上でLambda関数ポリシーが確認可能に
• これまでCLIかSDKで確認しかできなかった関数ポリシーがマネジメントコンソール上で確認可能に- トリガータブ内で確認可能
• リソースベースのポリシー設定が可能に- CreateEventSourceMapping- UpdateEventSourceMapping- DeleteEventSourceMapping- AddPermission- RemovePermission
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ファンクションへのタグ付けをサポート
• ファンクションへKey-Value形式のタグを付与することが可能に- ファンクションのグルーピングが簡単に
• ダッシュボード画面においてタグと値を指定してのフィルタリングが可能に
• AWS Billingともインテグレーション
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
利用可能なリージョンが追加
• Canada (Central)
• South America (São Paulo)
• Asia Pacific (Mumbai)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
デフォルトの同時実行数が増加
• セーフガードとして設定されている同時実行数がデフォルトで1000まで増加- 従来は100
• 3000までであればこれまでより簡単に上限緩和可能に
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(参考)同時実行数
1s 2s 3s 4s 5s
秒間リクエスト:10 req/sec
関数の平均実行時間: 3s / exec
同時実行数= “同時”に実行されているタイミング
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(参考)同時実行数 - ストリームベースの場合
同時実行数
ストリーム
シャード1
シャード2
シャード3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.