Schema to create Lambda function resource using SAM

An example of how to declare Lambda function in template.yaml of your SAM configuration

YourLambdaFunction:
    Type: AWS::Serverless::Function
    Properties:
      Description: A Lambda function description.
      Runtime: nodejs16.x
      Architectures:
        - x86_64
      Handler: index.handler
      MemorySize: 128
      Timeout: 100

More info on the available properties for the Lambda function creation is here. I use CDK documentation, as I have not found related to SAM resources.

Last updated