@@ -60,24 +60,62 @@ export class LayerPublisherStack extends Stack {
6060
6161 // This is the list of packages that we need include in the Lambda Layer
6262 // the name is the same as the npm workspace name
63- const utilities = [ 'commons' , 'logger' , 'metrics' , 'tracer' ] ;
63+ const utilities = [
64+ 'commons' ,
65+ 'logger' ,
66+ 'metrics' ,
67+ 'tracer' ,
68+ 'parameters' ,
69+ 'idempotency' ,
70+ 'batch' ,
71+ ] ;
6472
6573 // These files are relative to the tmp folder
6674 const filesToRemove = [
6775 'node_modules/@types' ,
6876 'package.json' ,
6977 'package-lock.json' ,
70- 'node_modules/**/README.md' ,
71- 'node_modules/.bin/semver' ,
78+ 'node_modules/**/*.md' ,
79+ 'node_modules/.bin' ,
80+ 'node_modules/**/*.html' ,
81+ 'node_modules/**/.travis.yml' ,
82+ 'node_modules/**/.eslintrc' ,
83+ 'node_modules/**/.npmignore' ,
84+ 'node_modules/semver/bin' ,
85+ 'node_modules/emitter-listener/test' ,
86+ 'node_modules/fast-xml-parser/cli' ,
7287 'node_modules/async-hook-jl/test' ,
88+ 'node_modules/stack-chain/test' ,
7389 'node_modules/shimmer/test' ,
7490 'node_modules/jmespath/artifacts' ,
75- // We remove the type definitions since they can't be used in the Lambda Layer
76- 'node_modules/@aws-lambda-powertools/*/lib/*.d.ts' ,
77- 'node_modules/@aws-lambda-powertools/*/lib/*.d.ts.map' ,
91+ 'node_modules/jmespath/bower.json' ,
92+ 'node_modules/obliterator/*.d.ts' ,
93+ 'node_modules/strnum/.vscode' ,
94+ 'node_modules/strnum/*.test.js' ,
95+ 'node_modules/uuid/bin' ,
96+ 'node_modules/uuid/esm-browser' ,
97+ 'node_modules/uuid/esm-node' ,
98+ 'node_modules/uuid/umd' ,
99+ 'node_modules/mnemonist/*.d.ts' ,
100+ // We remove the type definitions and ES builds since they are not used in the Lambda Layer
101+ 'node_modules/@aws-lambda-powertools/*/lib/**/*.d.ts' ,
102+ 'node_modules/@aws-lambda-powertools/*/lib/**/*.d.ts.map' ,
103+ 'node_modules/@aws-sdk/*/dist-types' ,
104+ 'node_modules/@aws-sdk/*/dist-es' ,
105+ 'node_modules/@smithy/*/dist-types' ,
106+ 'node_modules/@smithy/*/dist-es' ,
107+ 'node_modules/@smithy/**/README.md ' ,
108+ 'node_modules/@aws-sdk/**/README.md ' ,
78109 ] ;
79110 const buildCommands : string [ ] = [ ] ;
80- const modulesToInstall : string [ ] = [ ] ;
111+ // We need these modules because they are not included in the nodejs14x and nodejs16x runtimes
112+ const modulesToInstall : string [ ] = [
113+ '@aws-sdk/client-dynamodb' ,
114+ '@aws-sdk/util-dynamodb' ,
115+ '@aws-sdk/client-ssm' ,
116+ '@aws-sdk/client-secrets-manager' ,
117+ '@aws-sdk/client-appconfigdata' ,
118+ ] ;
81119
82120 if ( buildFromLocal ) {
83121 for ( const util of utilities ) {
0 commit comments