Skip to content

Commit

Permalink
[ADD] find functions with all layer versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ktx-mega committed Apr 29, 2024
1 parent 811588e commit ed93614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ exports.listLambdaFunctionsWithLayer = async ({
} while (nextMarker);

const layerARNWithoutVersion = layerARN.split(':').slice(0, -1).join(':')
const matchinFunctions = allFunctions.filter((func) => func.Layers && func.Layers.some((layer) => layer.Arn === layerARNWithoutVersion))
const matchinFunctions = allFunctions.filter((func) => func.Layers && func.Layers.some((layer) => layer.Arn.includes(layerARNWithoutVersion)))
const functionNames = matchinFunctions.map((func) => func.FunctionName);
return functionNames;
} catch (error) {
Expand Down

0 comments on commit ed93614

Please sign in to comment.