command line results are not accurate for command aws lambda list-functions --function-version ALL --region us-east-1 --output text --query "Functions[?Runtime=='java8'].FunctionArn"

0

I ran this command:

aws lambda list-functions --function-version ALL --region us-east-1 --output text --query "Functions[?Runtime=='java8'].FunctionArn"

in order to find out which lambda functions are using java8. I got several. But in the web console, I found no Java 8 runtime. All the lambda are using Java 11.

I suspect that the command line isn't returning accurate information. Is anyone experiencing the same issue?

xiao
asked 8 months ago401 views
5 Answers
0

oh I think I know what is going on... so the command line outputs include All the Old Versions! On the web console, if I click Versions, I can still see Java 8 as the runtime for some of the old versions. The "Versions" page matches the command line outputs! thank you for your help! this can be closed.

xiao
answered 8 months ago
0

On your question, I tested this out and it works perfectly fine and results are in sync with CLI output and console.

Can you make sure, if you are checking in same region ie. us-east-1 on console as well.

profile pictureAWS
EXPERT
answered 8 months ago
0

thank you for the reply. I just checked, both command line and web console are using region us-east-1. In fact, in the result the lambda names are all correct, the only difference is the runtime version.

xiao
answered 8 months ago
0

When using client-side filtering like this it's best to avoid using text output as this paginates before the filtering which can result in extra output sometimes. So you may be getting some Java 11 functions reported. See how you go with json or yaml output.

EXPERT
answered 8 months ago
0

The query returns Aliases and too, so if you updated the Latest the Aliases will still appear on the list.

answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions