How can I create an AWS Lambda function using the AWS CLI?

前端 未结 3 1916
心在旅途
心在旅途 2021-02-07 09:56

I am trying to create an AWS Lambda function using the command

aws lambda create-function \\
  --function-name foo\\
  --runtime nodejs\\
  --role lambda_basic_e         


        
3条回答
  •  甜味超标
    2021-02-07 10:46

    I've had the same issue on Ubuntu 18.04 and what did the trick was enclosing both the name of the function and the fileb:/// with double " quotes.

    aws lambda update-function-code --function-name "FUNCTION" --zip-file "fileb:///an/absolute/path/to/your/lambda/FUNCTION.zip"
    

提交回复
热议问题