我尝试更新我的aws lambda函数代码,我的命令是:
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
但我收到了以下错误:
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
为什么aws cli甚至没有显示更新功能代码?
答案 0 :(得分:0)
您正在使用的版本(aws-cli/1.6.6
)已经过时了;您应该升级到最新版本的aws CLI。以下是可用的
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