Skip to content

bagubagu/lambda-layers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lambda Layers

Lambda-layers for Bagubagu projects.

Usage

Latest version is 11. To use latest, add following to your sam template.

AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Resources:
  MyLambda:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: ./functions
      Handler: index.handler
      Runtime: nodejs12.x
      Timeout: 30
      MemorySize: 512
      Layers:
        - "arn:aws:lambda:us-east-1:116952590464:layer:bagubagu-common:11"

To use a specific version

AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Resources:
  MyLambda:
    Type: AWS::Serverless::Function
    Properties:
      FunctionName: my-lambda
      CodeUri: ./functions
      Handler: index.handler
      Runtime: nodejs12.x
      Timeout: 30
      MemorySize: 512
      Layers:
        - !Sub arn:aws:lambda:us-east-1:116952590464:layer:bagubagu-common:${LayerVersion}

Develop

Add useful-library npm module to bagubagu-common lambda-layer, then publish.

cd bagubagu-common/nodejs
yarn --production
yarn add useful-library
cd ../..
./scripts/publish-bagubagu-common.sh

Releases

No releases published

Packages

No packages published

Languages