0
votes

I tried to update my aws lambda function code ,my command is :

aws lambda update-function-code --function-name GmobiLambdaFunction / --region ap-southeast-1 \ --zip-file fileb://home/user/Documents/projects/analytics/git_repo/gmobiLambda_function/GmobiLambda/target/GmobiLambda-0.0.1-SNAPSHOT.jar / --s3-bucket gmobilambdafunctn.s3-website.ap-south-1.amazonaws.com / --s3-key /UPLOAD --s3-object-version 2.0

But i am recieving following error:

aws: error: argument operation: Invalid choice, valid choices are:

add-event-source                         | delete-function                         
get-event-source                         | get-function                            
get-function-configuration               | invoke-async                            
list-event-sources                       | list-functions                          
remove-event-source                      | update-function-configuration           
upload-function                          | help 

Why aws cli does not even show update-function-code?

1
whats your aws cli version ? most likely you need to update - Frederic Henri
i am using aws-cli/1.6.6 Python/2.7.6 Linux/4.4.0-79-generic - Don Jose
pretty old one, you need at least 1.7, but ideally upgrade to 1.11.x - Frederic Henri
will try !!Thanks for the update - Don Jose

1 Answers

0
votes

The version you're using (aws-cli/1.6.6) is pretty old; You should upgrade to latest version of the aws CLI. The following are available

add-permission                 delete-event-source-mapping    get-function                   list-aliases                   publish-version                update-event-source-mapping
create-alias                   delete-function                get-function-configuration     list-event-source-mappings     remove-permission              update-function-code
create-event-source-mapping    get-account-settings           get-policy                     list-functions                 tag-resource                   update-function-configuration
create-function                get-alias                      invoke                         list-tags                      untag-resource
delete-alias                   get-event-source-mapping       invoke-async                   list-versions-by-function      update-alias