For the last few weeks I’ve been getting emails from AWS about Node 6.10 going end of life and saying I have deployed Lambda using this level.
The emails don’t list which Lambda or which region they think are at fault which makes tracking down the culprit difficult. I only really have 1 live instance deployed across multiple regions (and 1 test instance on a single region).
Clicking down the list of regions is time consuming and prone to mistakes.
In the email AWS do provide a command to list which Lambda are running with Node 6.10:
aws lambda list-functions --query="Functions[?Runtime=='nodejs6.10']"
But what they fail to mention is that this only checks your current default region. I can’t find a way to get the aws command line tool to list the Lambda regions, the closest I’ve found is the list of ec2 regions which hopefully match up. Pairing this with the command line JSON search tool jq and a bit of Bash scripting I’ve come up with the following:
for r in `aws ec2 describe-regions --output text | cut -f3`; do echo $r; aws --region $r lambda list-functions | jq '. | .FunctionName + " - " + .Runtime'; done
This walks over all the regions as prints out all the function names and the runtime they are using.
eu-north-1 ap-south-1 eu-west-3 eu-west-2 eu-west-1 "Node-RED - nodejs8.10" "oAuth-test - nodejs8.10" ap-northeast-2 ap-northeast-1 sa-east-1 ca-central-1 ap-southeast-1 ap-southeast-2 eu-central-1 us-east-1 "Node-RED - nodejs8.10" us-east-2 us-west-1 us-west-2 "Node-RED - nodejs8.10"
In my case it only lists NodeJS 8.10 so I have no idea why AWS keep sending me these emails. Also since I’m only on the basic level I can’t even raise a technical help desk query to find out.
Anyway I hope this might be useful to others with the same problem.