README
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 |