Skip to content

Error when using with Cloudformation #11

@paul-uz

Description

@paul-uz

I am using a AWS::Serverless::Function resource to deploy my Lambda function.

I added arn:aws:lambda:eu-west-1:072686360478:layer:node-16_0_0:3 as a Layer to my function, and set runtime to provided.

Deployed the stack, but when running the Lambda, I get

Unknown application error occurred
Runtime.ErrorLoadingHandler

My cloudformation config for the Lambda

MyLambdaFunction:
    Type: 'AWS::Serverless::Function'
    Description: create endpoint
    Properties:
      Handler: index.main
      CodeUri: ../.dist/lambda/Create/lambda.zip
      Runtime: provided
      Timeout: 5
      MemorySize: 768
      Role: !GetAtt LambdaRole.Arn
      Environment:
        Variables:
          REGION: !Ref AWS::Region
      Layers:
        - arn:aws:lambda:eu-west-1:072686360478:layer:node-16_0_0:3
        - !Ref Layer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions