Aws lambda AWS Lambda cli更新功能代码不是有效选项
我试图更新aws lambda函数代码,我的命令是:Aws lambda AWS Lambda cli更新功能代码不是有效选项,aws-lambda,aws-cli,Aws Lambda,Aws Cli,我试图更新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-SN
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甚至不显示更新功能代码?您使用的版本(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
你的aws cli版本是什么?很可能您需要更新我正在使用aws cli/1.6.6 Python/2.7.6 Linux/4.4.0-79-generic非常旧,您至少需要1.7,但理想情况下升级到1.11.x将尝试!!谢谢你的更新