[英]AWS Lambda publish-layer-version, getting: Unknown options: --compatible-architectures, x86_64
I'm trying to create an AWS Lambda Layer using the AWS CLI on Ubuntu, like this:我正在尝试在 Ubuntu 上使用 AWS CLI 创建一个 AWS Lambda 层,如下所示:
aws lambda publish-layer-version \
--layer-name numpy --description "numpy Python 3.9" \
--zip-file fileb://./lambda/deps/numpy/python.zip \
--compatible-runtimes python3.9 \
--compatible-architectures "x86_64" --output text --query "LayerVersionArn"
But I'm getting this error:但我收到此错误:
Unknown options: --compatible-architectures, x86_64
I tried all sorts of combinations to no avail.我尝试了各种组合都无济于事。 Any ideas?
有任何想法吗?
The root cause was that I had AWS CLI version "aws-cli/2.2.2" installed on my machine...根本原因是我的机器上安装了 AWS CLI 版本“aws-cli/2.2.2”...
As soon as I updated to the latest (version aws-cli/2.4.16), it worked.一旦我更新到最新版本(版本 aws-cli/2.4.16),它就起作用了。
I hope this helps someone in the future.我希望这对将来的人有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.