Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created October 23, 2019 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianleroux/4686d9b7d247c5eed809822238470969 to your computer and use it in GitHub Desktop.
Save brianleroux/4686d9b7d247c5eed809822238470969 to your computer and use it in GitHub Desktop.
use the aws-sdk to list all your lambda functions in a stack
let aws = require('aws-sdk')
let cfn = new aws.CloudFormation
let StackName = 'your stackname here'
let isLambda = i=> i.ResourceType === 'AWS::Lambda::Function'
let resources = await cfn.listStackResources({StackName}).promise()
let functions = data.StackResourceSummaries.filter(isLambda)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment