AWSメモ &gtl;

AWS API Gateway&LambdaをFlask的に移行しやすいように作る

概要

メインハンドラ

ラッパー

template.yml

AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Test serverless application.

Resources:

  BookFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: myframework.handler
      Runtime: python3.6
      Events:
        List:
          Type: Api 
          Properties:
            Path: /books
            Method: get 
        Create:
          Type: Api 
          Properties:
            Path: /books
            Method: post
        Update:
          Type: Api 
          Properties:
            Path: /books/{id}
            Method: put 
        Delete:
          Type: Api 
          Properties:
            Path: /books/{id}
            Method: delete

トップ   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS