Untitled

 avatar
unknown
plain_text
3 years ago
753 B
8
Indexable
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: "Serverless Stack"
Resources:
  hello:
    Type: AWS::Serverless::Function
    Properties:
      Runtime: python3.9
      Handler: lambda.hello
      CodeUri: src/
      Environment:
        Variables:
          LINKS_TABLE: !Ref linkTable
      Events:
        Hello:
          Type: Api
          Properties:
            Path: /
            Method: get
  linkTable:
    Type: AWS::Serverless::SimpleTable
    Properties:
      TableName: 'linkstable'
      PrimaryKey:
        Name: id
        Type: String
            
Outputs:
  url:
    Value: !Sub https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod
  table:
    Value: !Ref linkTable
Editor is loading...