File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ async function getLambdasInStack(
145145 lambdaName : string ;
146146 logicalId : string ;
147147 stackName : string ;
148+ stackLogicalId : string ;
148149 } >
149150> {
150151 const response = await getCloudFormationResources (
@@ -165,7 +166,8 @@ async function getLambdasInStack(
165166 return {
166167 lambdaName : resource . PhysicalResourceId ! ,
167168 logicalId : resource . LogicalResourceId ! ,
168- stackName : stackLogicalId ?? stackName ,
169+ stackName : stackName ,
170+ stackLogicalId : stackLogicalId ?? stackName ,
169171 } ;
170172 } ) ?? [ ] ;
171173
Original file line number Diff line number Diff line change @@ -118,19 +118,11 @@ export class SamFramework implements IFramework {
118118 awsConfiguration ,
119119 ) ;
120120
121- const stackAndNestedStackNames = [
122- ...new Set ( lambdasInStack . map ( ( l ) => l . stackName ) ) ,
123- ] ;
124-
125121 Logger . verbose (
126122 `[SAM] Found Lambdas in stack ${ stackName } :` ,
127123 JSON . stringify ( lambdasInStack , null , 2 ) ,
128124 ) ;
129125
130- Logger . verbose (
131- `[SAM] Found the following stacks and nested stacks: ${ stackAndNestedStackNames . join ( ', ' ) } ` ,
132- ) ;
133-
134126 // get tags for each Lambda
135127 for ( const func of lambdas ) {
136128 const handlerFull = path . join ( func . codeUri ?? '' , func . handler ) ;
@@ -139,7 +131,8 @@ export class SamFramework implements IFramework {
139131
140132 const functionName = lambdasInStack . find (
141133 ( lambda ) =>
142- lambda . logicalId === func . name && lambda . stackName === func . stackName ,
134+ lambda . logicalId === func . name &&
135+ lambda . stackLogicalId === func . stackName ,
143136 ) ?. lambdaName ;
144137
145138 if ( ! functionName ) {
You can’t perform that action at this time.
0 commit comments