Click here to load reader

What's new with Serverless

  • View
    492

  • Download
    5

Embed Size (px)

Text of What's new with Serverless

  • #aws_serverless

    Whats New with ServerlessKeisuke Nishitani (@Keisuke69)

    Amazon Web Services Japan K.K.Dec 07, 2016

  • #aws_serverless

    ProfileKeisuke NishitaniSpecialist Solutions Architect, Amazon Web Service Japan K.K

    @Keisuke69 Keisuke69

    Specialist SA- Serverless- Mobile- DevOps- Application Service

    REST : http://keisuke69.hatenablog.jp/

    Keisuke69 Keisuke69Keisuke69x

  • #aws_serverless

  • #aws_serverless

    Serverless AppCI/CD

  • #aws_serverless

  • #aws_serverless

    AWS Serverless Application Model (SAM)

    CloudFomation

    Lambda

    LambdaSAM

  • #aws_serverless

    AWS Serverless Application ModelAWSTemplateFormatVersion: '2010-09-09Transform: AWS::Serverless-2016-10-31Resources: GetHtmlFunction:Type: AWS::Serverless::FunctionProperties:CodeUri: s3://flourish-demo-bucket/todo_list.zipHandler: index.gethtmlRuntime: nodejs4.3Policies: AmazonDynamoDBReadOnlyAccessEvents:GetHtml: Type: ApiProperties: Path: /{proxy+} Method: ANYListTable: Type: AWS::Serverless::SimpleTable

    Functions

    APIs

    Storage

  • #aws_serverless

    AWS Serverless Application ModelAWSTemplateFormatVersion: '2010-09-09Transform: AWS::Serverless-2016-10-31Resources: GetHtmlFunction:Type: AWS::Serverless::FunctionProperties:CodeUri: s3://flourish-demo-bucket/todo_list.zipHandler: index.gethtmlRuntime: nodejs4.3Policies: AmazonDynamoDBReadOnlyAccessEvents:GetHtml: Type: ApiProperties: Path: /{proxy+} Method: ANYListTable: 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:

  • #aws_serverless

    Serverless CI/CD pipeline

    CodePipelineGithubCodeCommitPull

    GitHub

    Source Deploy

    CloudFormationCodeBuild

    Build

    NEW!

  • #aws_serverless

    Serverless CI/CD pipeline

    CodePipelineGithubCodeCommitPull

    AWS CodeBuild npmpipJava

    GitHub

    Source Deploy

    CloudFormationCodeBuild

    Build

    NEW!

  • #aws_serverless

    Serverless CI/CD pipeline

    CodePipelineGithubCodeCommitPull AWS CodeBuild

    NpmpipJava AWS CloudFormation

    GitHub

    Source Deploy

    CloudFormationCodeBuild

    Build

    NEW!

  • #aws_serverless

    ICYMI: CloudWatch Percentiles

    Metrics-to-Logs

    CloudWatch logs

  • #aws_serverless

    AWS X-RayAWS X-Ray

    Lambda

    AWSLambda

    AmazonS3

    AmazonDynamoDB

  • #aws_serverless

    AWS X-Ray AWS

    dwelltimes

    servicecalltimes

    retries

  • #aws_serverless

    AWS Lambda Kinesis IteratorAT_TIMESTAMP

    C#

  • #aws_serverless

    AT_TIMESTAMP KinesisAT_TIMESTAMP

    AmazonKinesis

    LATESTTRIM_HORIZON TIMESTAMP

  • #aws_serverless

    C#C#

  • #aws_serverless

    Dead Letter Queue, DLQ

    3

    SQSSNS

    AmazonSQS

    AmazonSNS

    AWSLambda

  • #aws_serverless

    Lambda Everywhere

  • #aws_serverless

    AWS Step FunctionsLambda

    3

  • #aws_serverless

    Lambda Bots and Amazon Lex

    Lambda

    FacebookMobileHub

    SlackTwilio

    Idliketobookahotel

  • #aws_serverless

    AWS Snowball EdgeAWS

    100TB

    Lambda

  • #aws_serverless

    AWS GreengrassPreviewAWS

    Lambda

    AWS IoT

    1GHz 128MBx86/ARMLinux

  • #aws_serverless

    [email protected]/

    Viewer

    Node.js50ms Signuptojointhepreview!

  • #aws_serverless

    API Gateway

  • #aws_serverless

    Content-TypeAccept

    Lambdabase64

  • #aws_serverless

    API API Swagger /

    Coolfeature:Inheritance!

  • #aws_serverless

    AWS Marketplace API

    API

    API

    /APIAPI

    AWS

    URLReputationAPIs

    SpeechunderstandingAPIs

  • #aws_serverless

    Developer Portal API API GatewayAPI

    S3Static Web Site Hosting https://github.com/awslabs/aws-api-gateway-developer-portal

  • #aws_serverless

    Developer ecosystem

    MonitoringDeploymentIntegrationsCodeLibraries APNSkills

  • #aws_serverless

    Developer ecosystem

    Chalice Framework

  • #aws_serverless

    112 1457

    https://aws-serverless.connpass.com/event/45337/

  • #aws_serverless