我试图通过awscli创建lambda函数但是收到错误:
未知选项: - 环境,
执行的步骤:
export AWS_DEFAULT_REGION=us-east-1
ESENDPOINT="search-iacapps-es-ggkr4trzo5ezjxqchkiva.us-east-1.es.amazonaws.com"
root@ip-172-31-21-120:/# aws lambda create-function --function-name es-cleanup-lambda --environment Variables={es_endpoint=$ESENDPOINT} --zip-file fileb://es-cleanup-lambda.zip --description "Elastichsearch Index Cleanup" --role arn:aws:iam::342234566657195:role/es-cleanup-lambda --handler es-cleanup.lambda_handler --runtime python2.7 --timeout 180
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
**Unknown options: --environment**, Variables={es_endpoint=search-iacapps-es-ggkr4trzo5ezjxqchkiva.us-east-1.es.amazonaws.com}
cli --version
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
pip --version
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
更新没有帮助。
答案 0 :(得分:-1)
使用'pip install awscli --upgrade'升级后,您将需要重新启动Shell。