Usage:
// ZipLayer bundles the tar gzip 7z in a lambda layer
import { ZipLayer } from 'cdk-lambda-layer-zip';
declare const fn: lambda.Function;
fn.addLayers(new ZipLayer(this, 'ZipLayer'));
import { ZipLayer } from 'cdk-lambda-layer-zip'
import * as lambda from 'aws-cdk-lib/aws-lambda'
new lambda.Function(this, 'MyLambda', {
code: lambda.Code.fromAsset(path.join(__dirname, 'my-lambda-handler')),
handler: 'index.main',
runtime: lambda.Runtime.PYTHON_3_9,
layers: [new ZipLayer(this, 'ZipLayer')]
});