@cfn-modules/lambda-layerdeprecated

AWS Lambda layer for the use with Lambda function.

Usage no npm install needed!

<script type="module">
  import cfnModulesLambdaLayer from 'https://cdn.skypack.dev/@cfn-modules/lambda-layer';
</script>

README

Build Status NPM version

cfn-modules: AWS Lambda layer

AWS Lambda layer for the use with Lambda function.

Install

Install Node.js and npm first!

npm i @cfn-modules/lambda-layer

Usage

---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules example'
Resources:
  Layer:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        ContentBucket: 'BucketName' # required
        ContentKey: 'layer.zip' # required
        ContentVersion: '' # optional
        CompatibleRuntimes: '' # optional
      TemplateURL: './node_modules/@cfn-modules/lambda-layer/module.yml'
  Function:
    Type: 'AWS::CloudFormation::Stack'
    Properties:
      Parameters:
        LayerModule: !GetAtt 'Layer.Outputs.StackName' # optional
        ...
      TemplateURL: './node_modules/@cfn-modules/lambda-function/module.yml'

Parameters

Name Description Default Required? Allowed values
CompatibleRuntimes List of compatible runtimes (e.g. nodejs6.10,nodejs8.10) no
ContentBucket The name of the S3 bucket containing the layer content. yes
ContentKey The key of the S3 object - a ZIP file - including the layer content. yes
ContentVersion The version of the S3 object - a ZIP file - including the layer content. no