Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

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

aws lambda create-function \

  --function-name foo\

  --runtime nodejs\

  --role lambda_basic_execution \

  --handler asdf --zip-file "fileb:://boom.zip"

I have a file called boom.zip available in the directory. But I cannot deploy using the above command.

The failure message I get is 

--zip-file must be a file with the fileb:// prefix.

Does anyone have a working example to create a lambda function using the AWS CLI?

1 Answer

0 votes
by (44.4k points)

The file specifications have an extra colon “:”.

$ aws lambda create-function --function-name foo --runtime nodejs --role lambda_basic_execution --handler asdf --zip-file "fileb:://boom.zip"

 

--zip-file must be a file with the fileb:// prefix.

Example usage:  --zip-file fileb://path/to/file.zip

 

$ aws lambda create-function --function-name foo --runtime nodejs --role lambda_basic_execution --handler asdf --zip-file "fileb://boom.zip"

Error parsing parameter '--zip-file': Unable to load paramfile fileb://boom.zip: [Errno 2] No such file or directory: 'boom.zip'

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

Browse Categories

...