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
demandé il y a 8 mois415 vues
5 réponses
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
répondu il y a 8 mois
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
répondu il y a 8 mois
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
répondu il y a 8 mois
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
répondu il y a 8 mois
0

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

répondu il y a 3 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions