Sha256: f541172f0579e5997064c0719a4df2a2188cedb052dae27f7703248e3d60a250

Contents?: true

Size: 1.05 KB

Versions: 6

Compression:

Stored size: 1.05 KB

Contents

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: APPNAMEHERE Lambda (HTTP API)

Parameters:

  RailsEnv:
    Type: String
    Default: production
    AllowedValues:
      - staging
      - production

Resources:

  RailsFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: .
      Handler: app.handler
      Runtime: ruby2.7
      MemorySize: 512
      Timeout: 30
      Environment:
        Variables:
          RAILS_ENV: !Ref RailsEnv
      FunctionName: !Join [ '', [ 'APPNAMEHERE-', !Ref RailsEnv, '-', !Ref 'AWS::Region' ] ]
      Events:
        RailsApiProxy:
          Type: HttpApi
          Properties:
            ApiId: !Ref RailsApi
      AutoPublishAlias: live

  RailsApi:
    Type: AWS::Serverless::HttpApi
    Properties:
      StageName: !Ref RailsEnv

Outputs:

  RailsApiUrl:
    Description: API Gateway Endpoint
    Value: !Sub "https://${RailsApi}.execute-api.${AWS::Region}.amazonaws.com/${RailsEnv}/"

  RailsFunctionArn:
    Description: Lambda ARN
    Value: !GetAtt RailsFunction.Arn

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lamby-2.2.2 lib/lamby/templates/http/template.yaml
lamby-2.2.1 lib/lamby/templates/http/template.yaml
lamby-2.2.0 lib/lamby/templates/http/template.yaml
lamby-2.1.0 lib/lamby/templates/http/template.yaml
lamby-2.0.1 lib/lamby/templates/http/template.yaml
lamby-2.0.0 lib/lamby/templates/http/template.yaml