@@ -414,9 +414,6 @@ export class ServerlessSpy extends Construct {
414
414
const layerKey = ( r : lambda . Runtime , a : lambda . Architecture ) =>
415
415
`${ r . toString ( ) } _${ a . name . toString ( ) } ` ;
416
416
417
- console . log ( 'RUNTIME: ' , runtime ) ;
418
- console . log ( 'ARCHITECTURE: ' , architecture ) ;
419
-
420
417
let layer = this . layerMap [ layerKey ( runtime , architecture ) ] ;
421
418
let spyWrapperPath = '/opt/spy-wrapper' ;
422
419
@@ -430,20 +427,26 @@ export class ServerlessSpy extends Construct {
430
427
spyWrapperPath = '/opt/python/spy-wrapper' ;
431
428
layer =
432
429
layer ||
433
- new PythonLayerVersion ( this , 'PythonExtension' , {
434
- compatibleRuntimes : [ runtime ] ,
435
- compatibleArchitectures : [ architecture ] ,
436
- entry : location ,
437
- bundling : {
438
- bundlingFileAccess : BundlingFileAccess . VOLUME_COPY ,
439
- // command: [
440
- // `cp ${path.join(
441
- // location.substring(0, location.lastIndexOf(path.sep)),
442
- // 'spy-wrapper/spy-wrapper'
443
- // )} /asset-output/python`,
444
- // ],
445
- } ,
446
- } ) ;
430
+ new PythonLayerVersion (
431
+ this ,
432
+ `PythonExtension${ runtime . name
433
+ . replace ( 'python' , '' )
434
+ . replace ( '.' , '_' ) } `,
435
+ {
436
+ compatibleRuntimes : [ runtime ] ,
437
+ compatibleArchitectures : [ architecture ] ,
438
+ entry : location ,
439
+ bundling : {
440
+ bundlingFileAccess : BundlingFileAccess . VOLUME_COPY ,
441
+ // command: [
442
+ // `cp ${path.join(
443
+ // location.substring(0, location.lastIndexOf(path.sep)),
444
+ // 'spy-wrapper/spy-wrapper'
445
+ // )} /asset-output/python`,
446
+ // ],
447
+ } ,
448
+ }
449
+ ) ;
447
450
break ;
448
451
case lambda . Runtime . NODEJS_12_X . name :
449
452
case lambda . Runtime . NODEJS_14_X . name :
0 commit comments