Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/ServerlessSpy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface SpyFilter {
}

const isLambdaFunction = (node: IConstruct): node is lambda.Function =>
'functionName' in node && 'functionArn' in node;
'functionName' in node && 'functionArn' in node && 'runtime' in node;

const serverlessSpyIotEndpointCrNamePrefix = 'ServerlessSpyIotEndpoint';

Expand Down Expand Up @@ -413,6 +413,10 @@ export class ServerlessSpy extends Construct {
): { layer: lambda.ILayerVersion; spyWrapperPath: string } | undefined {
const layerKey = (r: lambda.Runtime, a: lambda.Architecture) =>
`${r.toString()}_${a.name.toString()}`;

console.log('RUNTIME: ', runtime);
console.log('ARCHITECTURE: ', architecture);

let layer = this.layerMap[layerKey(runtime, architecture)];
let spyWrapperPath = '/opt/spy-wrapper';

Expand Down
1 change: 1 addition & 0 deletions test/cdk/src/lambdaStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class LambdaStack extends Stack {
NODE_OPTIONS: '--enable-source-maps',
},
});
func.addAlias('live');

// use uncommon name
const func2 = new NodejsFunction(this, 'my_lambda-TestName_2', {
Expand Down
Loading