What’s New with Serverless
Keisuke Nishitani (@Keisuke69)
Amazon Web Services Japan K.K.
Dec 11, 2016
Profile
Keisuke Nishitani
Specialist Solutions Architect, Amazon Web Service Japan K.K
@Keisuke69 Keisuke69
✤ Specialist SA
- Serverless
- Mobile
- DevOps
- Application Service
✤ ソーシャルで⾚ドクロの⼈です
✤ RESTおじさん
✤ 餃⼦の王将エヴァンジェリスト(⾃称)
✤ ⾳楽が好きです、フジロッカーです、今年も⾏きました
✤ ブログ: http://keisuke69.hatenablog.jp/
Keisuke69 Keisuke69Keisuke69x
サーバレスプラットフォームの機能性
Serverless AppのCI/CD
環境変数のサポート
AWS Serverless Application Model (SAM)
✤ サーバレスアプリケーションの構成を定義するための共通⾔語
⎻ CloudFomationのエクステンション
✤ Lambdaベースのアプリケーションをパッケージしてデプロイするた
めのツール
✤ コンソール上からLambdaのブループリントや
ファンクションをSAMとしてエクスポート可能
AWS Serverless Application Model
AWSTemplateFormatVersion: '2010-09-09’
Transform: AWS::Serverless-2016-10-31
Resources: GetHtmlFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://flourish-demo-bucket/todo_list.zip
Handler: index.gethtml
Runtime: nodejs4.3
Policies: AmazonDynamoDBReadOnlyAccess
Events:
GetHtml: Type: Api
Properties: Path: /{proxy+} Method: ANY
ListTable: Type: AWS::Serverless::SimpleTable
Functions
APIs
Storage
AWS Serverless Application Model
AWSTemplateFormatVersion: '2010-09-09’
Transform: AWS::Serverless-2016-10-31
Resources: GetHtmlFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://flourish-demo-bucket/todo_list.zip
Handler: index.gethtml
Runtime: nodejs4.3
Policies: AmazonDynamoDBReadOnlyAccess
Events:
GetHtml: Type: Api
Properties: Path: /{proxy+} Method: ANY
ListTable: Type: AWS::Serverless::SimpleTable
AWSTemplateFormatVersion: '2010-09-09'
Resources:
GetHtmlFunctionGetHtmlPermissionProd:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:invokeFunction
Principal: apigateway.amazonaws.com
FunctionName:
Ref: GetHtmlFunction
SourceArn:
Fn::Sub: arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${ServerlessRestApi}/Prod/ANY/*
ServerlessRestApiProdStage:
Type: AWS::ApiGateway::Stage
Properties:
DeploymentId:
Ref: ServerlessRestApiDeployment
RestApiId:
Ref: ServerlessRestApi
StageName: Prod
ListTable:
Type: AWS::DynamoDB::Table
Properties:
ProvisionedThroughput:
WriteCapacityUnits: 5
ReadCapacityUnits: 5
AttributeDefinitions:
- AttributeName: id
AttributeType: S
KeySchema:
- KeyType: HASH
AttributeName: id
GetHtmlFunction:
Type: AWS::Lambda::Function
Properties:
Handler: index.gethtml
Code:
S3Bucket: flourish-demo-bucket
S3Key: todo_list.zip
Role:
Fn::GetAtt:
- GetHtmlFunctionRole
- Arn
Runtime: nodejs4.3
GetHtmlFunctionRole:
Type: AWS::IAM::Role
Properties:
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AmazonDynamoDBReadOnlyAccess
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Action:
- sts:AssumeRole
Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
ServerlessRestApiDeployment:
Type: AWS::ApiGateway::Deployment
Properties:
RestApiId:
Ref: ServerlessRestApi
Description: 'RestApi deployment id:127e3fb91142ab1ddc5f5446adb094442581a90d'
StageName: Stage
GetHtmlFunctionGetHtmlPermissionTest:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:invokeFunction
Principal: apigateway.amazonaws.com
FunctionName:
Ref: GetHtmlFunction
SourceArn:
Fn::Sub: arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${ServerlessRestApi}/*/ANY/*
ServerlessRestApi:
Type: AWS::ApiGateway::RestApi
Properties:
Body:
info:
version: '1.0'
title:
Ref: AWS::StackName
paths:
"/{proxy+}":
x-amazon-apigateway-any-method:
x-amazon-apigateway-integration:
httpMethod: ANY
type: aws_proxy
uri:
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-
31/functions/${GetHtmlFunction.Arn}/invocations
responses: {}
swagger: '2.0'
REPLACES:
Serverless CI/CD pipeline
✤ CodePipelineを⽤いてGithubもしくはCodeCommitからソースを直接
Pull
GitHub
Source Deploy
CloudFormationCodeBuild
Build
NEW!
Serverless CI/CD pipeline
✤ CodePipelineを⽤いてGithubもしくはCodeCommitからソースを直接
Pull
✤ AWS CodeBuildでサーバレスアプリのビルドとパッケージング
⎻ npm、pip、Javaコンパイル
GitHub
Source Deploy
CloudFormationCodeBuild
Build
NEW!
Serverless CI/CD pipeline
✤ CodePipelineを⽤いてGithubもしくはCodeCommitからソースを直接Pull
✤ AWS CodeBuildでサーバレスアプリのビルドとパッケージング
⎻ Npm、pip、Javaコンパイル
✤ AWS CloudFormationで完成したアプリをデプロイ
GitHub
Source Deploy
CloudFormationCodeBuild
Build
NEW!
ICYMI: CloudWatchの新機能
✤ Percentiles
⎻ あらゆるメトリクスで
パーセンタイル統計を
サポート
✤ Metrics-to-Logs
⎻ メトリクスのポイント
から直接CloudWatch
logsに⾶べるように
AWS X-Rayとのインテグレーション
✤AWS X-Rayを⽤いることでサービス間の
イベントの遷移を可視化
✤Lambdaファンクションから他のサービス
に対する呼び出しと時間をトレース
✤ファンクションとサービスの依存関係、関
連性を実際に⽬視
✤消えたイベントやスロットルといった状態
を確認したり診断したりが簡単に
✤簡単なセットアップ
✤サポートはもう間もなく
簡単セットアップ
AWS
Lambda
Amazon
S3
Amazon
DynamoDB
AWS X-Rayとのインテグレーション
✤ ⾮同期呼び出しの滞留時間とリトライを確認
✤ AWSサービスに対する呼び出しパフォーマンスをプロファイリング
⎻ イベント処理の失敗を検知
⎻ パフォーマンス問題の特定と修正が簡単に
dwell
times
service	call	
times
retries
AWS Lambdaの新機能・エンハンス
✤ Kinesis IteratorとしてAT_TIMESTAMPをサポート
✤ 対応⾔語としてC#のサポート
✤ デッドレターキュー
AT_TIMESTAMPのサポート
✤ Kinesisのイテレータとして新たにAT_TIMESTAMPをサポート
✤ 任意の時点でのストリームデータ処理が可能
✤ データが巻き戻ったり、失われたりすることなく処理の停⽌と開始
Amazon	Kinesis
LATESTTRIM_HORIZON TIMESTAMP
C#サポート
✤ 新しい⾔語としてC#をサポート
⎻ .NET Core で動作
⎻ Win32 API や COMコンポーネントは呼べません
✤ Visual Studio に統合された環境を利⽤可能
⎻ AWS Tools for Visual Studio 最新版をインストールしてください
⎻ dotnet CLIベースの開発も可能
✤ Context等の基本的なものから、 シリアライザや各サービスのイベン
トオブジェクトなど3種類のライブラリを提供
⎻ Nugetでインストール
17
Lambda関数ハンドラ(C#)
✤ クラスの静的またはインスタンス メソッドとして定義
✤ デフォルトではSystem.IO.Stream型をサポート
⎻ それ以外の型はシリアライザが必要
✤ シグニチャの例
⎻ public Stream RunLambda(Stream inputStream);
⎻ public string RunLambda(string inputString);
⎻ public MyResponse RunLambda(MyRequest request);
⎻ POCO in(イベント オブジェクトを含む), POCO out
⎻ public void RunLambda(MyRequest request);
⎻ public async Task<MyResponse> RunLambda(...);
⎻ ⾮同期呼び出し
⎻ 但し、Labmdaは戻り値を無視する(void にすることも可能だがasync voidは未サポート)
returnType handler-name(inputType input, ILambdaContext context) { ... }
AWS Lambda C# Project Template
AWS Labmda C# Blue Print
Publish to AWS Lambda
ローカル環境でLambda C#コードのデバッグ
デッドレターキュー(Dead Letter Queue, DLQ)
✤ 信頼性の⾼いエンドツーエンドのイベン
ト処理ソリューションの作成が簡単に
✤ 3回実⾏しても処理されなかったイベント
をSQSのキューもしくはSNSトピックへ
と送信
✤ コードに問題が有る場合や、スロットル
される場合もイベントを保存
✤ ファンクション単位
✤ すべての⾮同期呼び出しで利⽤可能 Amazon
SQS
Amazon
SNS
AWS
Lambda
Lambda Everywhere
AWS Step Functions
✤信頼性⾼く複数のLambdaファンクション
をオーケストレーション
✤3回以上の試⾏
✤⾮同期なファンクションに対するコール
バックの追加
✤待ち合わせのハンドリング
✤連鎖的なファンクション実⾏
✤ロングランニングなワークフローのサポー
ト
Lambda Bots and Amazon Lex
•テキストスピー
チ
•ビジネスロジッ
クをLambdaで実
⾏
•Facebook、
MobileHub
•Slackおよび
Twilio とのインテ
グレーションは
近⽇中
I’d	like	to	book	a	hotel
AWS Snowball Edge
✤オンプレからAWSへの⾼速・シ
ンプル・セキュアなデータ移⾏
✤100TBクラスのキャパシティ
✤ローカルでLambdaファンクショ
ンを実⾏可能
✤マルチメディアコンテンツの変
換、リアルタイムな圧縮、監査
AWS Greengrass(Preview)
✤AWSの処理をデバイス上でも
✤低遅延、ニアリアルタイム
✤デバイス上でLambdaファンクショ
ンを実⾏
✤AWS IoTを通じたクラウドストレー
ジとコンピュート
✤必要スペック:1GHz、 128MB、
x86/ARM、Linux
Lambda@Edge(Preview)
✤低レイテンシなリクエスト/レス
ポンスのカスタマイズ
✤Viewerとオリジンのイベントを
サポート
✤プレビューでの制限
⎻ Node.jsのみ
⎻ 最⼤50msのタイムアウト
⎻ ヘッダのみ
Sign	up	to	join	the	preview!
API Gatewayアップデート
バイナリのサポート
イメージやオー
ディオなどのバイ
ナリコンテンツを
サポート
Content-TypeとAcceptヘッダを参照してハンドリング
Lambdaインテグレーションの場合は
⾃動的にbase64でエンコード
APIドキュメンテーション
✤ APIをドキュメント化–コンソール上から直接編集可能
✤ Swagger インポート/エクスポート
✤ 独⽴した更新とパブリッシュのフローをサポート
Cool	feature:	
Inheritance!
AWS Marketplaceとのインテグレーション
✤ APIのマネタイズ
✤ ⾃⾝のAPIをマーケットプレイス上で販
売可能
✤ API利⽤者のための簡単な発⾒と調達
✤ コンシューマ/APIキーによるAPI利⽤量
のトラッキング
✤ AWSによる⾃動化された請求処理
URL	Reputation	APIs
Speech	understanding	
APIs
Developer Portalの⽣成
✤ API利⽤者のためのポータルサイトを⽣成
✤ API Gatewayで作成したAPIのリストやカタログと開発者のサインアップを
実現するサーバレスなアプリケーションを⽣成
✤ S3のStatic Web Site Hosting機能で配信可能
✤ https://github.com/awslabs/aws-api-gateway-developer-portal
Developer ecosystem
MonitoringDeploymentIntegrationsCode	Libraries APN	Skills
Developer ecosystem
Chalice
Framework
サーバレス個別相談会やります
✤ 1⽉12⽇(⽊)にサーバレスに関する個別技術相談会を開催します
✤ サーバレスなシステムに関するアーキテクチャ相談
✤ 1スロット、45分で7スロット受け付け予定
✤ 要事前登録
✤ もちろん無料
https://aws-serverless.connpass.com/event/45337/
What's new with Serverless

More Related Content

PDF
Application Lifecycle Management in a Serverless World
PDF
What is Serverless?
PDF
AWSのサーバレス関連アップデートを10分で紹介します
PPTX
CRM分析サービス crm analyzer expressを 支えるサーバレスな色々
PDF
Introduction to AWS X-Ray
PDF
Serverless Anti-Patterns
PDF
AWSでアプリ開発するなら 知っておくべこと
PDF
AWS SAMで始めるサーバーレスアプリケーション開発
Application Lifecycle Management in a Serverless World
What is Serverless?
AWSのサーバレス関連アップデートを10分で紹介します
CRM分析サービス crm analyzer expressを 支えるサーバレスな色々
Introduction to AWS X-Ray
Serverless Anti-Patterns
AWSでアプリ開発するなら 知っておくべこと
AWS SAMで始めるサーバーレスアプリケーション開発

What's hot (20)

PDF
May the FaaS be with us!!
PDF
クラウド時代のソフトウェアアーキテクチャ
PDF
Androidを中心に紐解くIoT
PPTX
Jaws days2017-ops jaws-2
PDF
Serverless ArchitectureにおけるNoSQL Services 〜DynamoDBも良いけどSimpleDBも忘れないであげてください!!〜
PPTX
Introducing C# in AWS Lambda
PDF
Serverless Meetup Tokyo #1 オープニング
PDF
Serverless AWS構成でセキュアなSPAを目指す
PDF
DevOpsとか言う前にAWSエンジニアに知ってほしいアプリケーションのこと
PPTX
Raspberry Piを利用した顔の表情分析と感情を認識するシステム構築
PDF
サーバーレスアーキテクチャのすすめ(公開版)
PDF
サーバーレスのアーキテクチャパターンとそれぞれの実装・テストの勘所
PDF
Introducing Serverless Computing (20160802)
PDF
Tune Up AWS Lambda
PDF
サーバーレス・アーキテクチャ概要
PDF
サーバーレスの今とこれから
PPTX
jawsdays 2017 新訳-とある設計士の雲設計定石目録_3
PDF
Building Scalable Application on the Cloud
PDF
Running Java Apps with Amazon EC2, AWS Elastic Beanstalk or Serverless
PDF
サーバーレスの話
May the FaaS be with us!!
クラウド時代のソフトウェアアーキテクチャ
Androidを中心に紐解くIoT
Jaws days2017-ops jaws-2
Serverless ArchitectureにおけるNoSQL Services 〜DynamoDBも良いけどSimpleDBも忘れないであげてください!!〜
Introducing C# in AWS Lambda
Serverless Meetup Tokyo #1 オープニング
Serverless AWS構成でセキュアなSPAを目指す
DevOpsとか言う前にAWSエンジニアに知ってほしいアプリケーションのこと
Raspberry Piを利用した顔の表情分析と感情を認識するシステム構築
サーバーレスアーキテクチャのすすめ(公開版)
サーバーレスのアーキテクチャパターンとそれぞれの実装・テストの勘所
Introducing Serverless Computing (20160802)
Tune Up AWS Lambda
サーバーレス・アーキテクチャ概要
サーバーレスの今とこれから
jawsdays 2017 新訳-とある設計士の雲設計定石目録_3
Building Scalable Application on the Cloud
Running Java Apps with Amazon EC2, AWS Elastic Beanstalk or Serverless
サーバーレスの話
Ad

Viewers also liked (15)

PDF
What's new with Serverless
PDF
Introducing Amazon Rekognition, Amazon Polly and Amazon Lex
PDF
Serverless Revolution
PDF
スタートアップがグローバルなシステムを作るために、積極的にサーバーレスに取り組んでみた話 / Serverless Meetup Sapporo
PDF
AWS Lambdaを紐解く
PDF
AWS Lambda / Amazon API Gateway Deep Dive
PDF
Going Serverless, Building Applications with No Servers
PDF
Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207
PDF
Serverless Meetup Tokyo #2 オープニング
PDF
SEO対策したサイトをAPI Gateway+Lambdaで作った話
PDF
Awsで作るビッグデータ解析今とこれから
PDF
20161111 java one2016-feedback
PDF
デモから見るOpenWhisk - Docker Action -
PDF
Serverless meetup02 openwhisk
PDF
The Internal of Serverless Plugins
What's new with Serverless
Introducing Amazon Rekognition, Amazon Polly and Amazon Lex
Serverless Revolution
スタートアップがグローバルなシステムを作るために、積極的にサーバーレスに取り組んでみた話 / Serverless Meetup Sapporo
AWS Lambdaを紐解く
AWS Lambda / Amazon API Gateway Deep Dive
Going Serverless, Building Applications with No Servers
Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207
Serverless Meetup Tokyo #2 オープニング
SEO対策したサイトをAPI Gateway+Lambdaで作った話
Awsで作るビッグデータ解析今とこれから
20161111 java one2016-feedback
デモから見るOpenWhisk - Docker Action -
Serverless meetup02 openwhisk
The Internal of Serverless Plugins
Ad

Similar to What's new with Serverless (20)

PDF
Serverless Architecture on AWS(20151121版)
PDF
Serverless Architecture on AWS (20151201版)
PDF
Growing up serverless
PDF
Serverless Architecture on AWS(20151023版)
PDF
Anchors Aweigh!! - re:Invent報告@re:Port 2016 大阪
PDF
20200728 AWS Black Belt Online Seminar What's New in Serverless
PDF
JAWS-UGアーキテクチャ専門支部 ServerlessConfレポート
PDF
AWS Black Belt Online Seminar 2016 AWS CloudFormation
PDF
20190814 AWS Black Belt Online Seminar AWS Serverless Application Model
PPTX
re:invent2018 総ざらえ
PDF
Serverless services on_aws_dmm_meetup_20170801
PPTX
マルチリージョン・マルチアカウント対応の柔軟な構築ツールを作ってみた
PDF
[CTO Night & Day 2019] AWS のコスト最適化 #ctonight
PDF
2017年2月のAWSサービスアップデートまとめ
PDF
Azureをフル活用したサーバーレスの潮流について
PDF
AWS re:Invent2019 Overview & New Releases Summary for Game
PPTX
20190620 aws summit_tokyo_2019
PDF
ユーザーからみたre:Inventのこれまでと今後
PDF
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説
PDF
AWS Wavelengthと大阪リージョンのご紹介20210414
Serverless Architecture on AWS(20151121版)
Serverless Architecture on AWS (20151201版)
Growing up serverless
Serverless Architecture on AWS(20151023版)
Anchors Aweigh!! - re:Invent報告@re:Port 2016 大阪
20200728 AWS Black Belt Online Seminar What's New in Serverless
JAWS-UGアーキテクチャ専門支部 ServerlessConfレポート
AWS Black Belt Online Seminar 2016 AWS CloudFormation
20190814 AWS Black Belt Online Seminar AWS Serverless Application Model
re:invent2018 総ざらえ
Serverless services on_aws_dmm_meetup_20170801
マルチリージョン・マルチアカウント対応の柔軟な構築ツールを作ってみた
[CTO Night & Day 2019] AWS のコスト最適化 #ctonight
2017年2月のAWSサービスアップデートまとめ
Azureをフル活用したサーバーレスの潮流について
AWS re:Invent2019 Overview & New Releases Summary for Game
20190620 aws summit_tokyo_2019
ユーザーからみたre:Inventのこれまでと今後
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説
AWS Wavelengthと大阪リージョンのご紹介20210414

More from Keisuke Nishitani (10)

PDF
AWS Lambda Updates
PDF
AWSで実現するクラウドネイティブなアプリ開発のポイント
PDF
Scale Your Business without Servers
PDF
RESTful API 入門
PDF
AWSにおける モバイル向けサービス及び事例紹介(20151211)
PDF
Automated Testing on AWS Device Farm
PDF
クラウドネイティブ化する未来
PDF
UnityとAmazon Web Servicesで生み出す新しい価値
PDF
AWS Lambda Update
PDF
RubyとAmazon Web Service で生み出す新しい価値
AWS Lambda Updates
AWSで実現するクラウドネイティブなアプリ開発のポイント
Scale Your Business without Servers
RESTful API 入門
AWSにおける モバイル向けサービス及び事例紹介(20151211)
Automated Testing on AWS Device Farm
クラウドネイティブ化する未来
UnityとAmazon Web Servicesで生み出す新しい価値
AWS Lambda Update
RubyとAmazon Web Service で生み出す新しい価値

What's new with Serverless