title: How can I create an AWS Lambda function using the AWS CLI?
body: <p>I am trying to create an AWS Lambda function using the command</p>
  
  <pre><code>aws lambda create-function \
    --function-name foo\
    --runtime nodejs\
    --role lambda_basic_execution \
    --handler asdf --zip-file "fileb:://boom.zip"
  </code></pre>
  
  <p>I have a file called boom.zip available in the directory. But I cannot deploy using the above command. </p>
  
  <p>The failure message I get is </p>
  
  <blockquote>
    <p>--zip-file must be a file with the fileb:// prefix.</p>
  </blockquote>
  
  <p>Does anyone have a working example to create a lambda function using the AWS CLI?</p>