title: How to upload aws lambda layer deployment package to s3 bucket using aws cli?
body: <p>I am trying to upload AWS Lambda's layer deployment package to s3 bucket using aws cli(since it's more than 50 megs), here is my command:</p>
  
  <p><code>aws lambda publish-layer-version --layer-name “layer name” --description "Layer description” --content S3Bucket=“s3-name/location”,S3Key=“package.zip”,S3ObjectVersion=“1” --license-info "MIT" --compatible-runtimes "nodejs8.10" --zip-file "fileb:////tmp/package.zip"</code></p>
  
  <p>I am just not sure about the --content part where I am specifying (S3Bucket, S3Key and S3ObjectVersion). N.B it works perfectly without --content</p>
  
  <p><code>aws lambda publish-layer-version --layer-name “layer name” --description "Layer description” --content S3Bucket=“s3-name/location”,S3Key=“package.zip”,S3ObjectVersion=“1” --license-info "MIT" --compatible-runtimes "nodejs8.10" --zip-file "fileb:////tmp/package.zip"</code></p>
  
  <p>With the above code, I get the following error message:</p>
  
  <blockquote>
    <p>An error occurred (InvalidParameterValueException) when calling the PublishLayerVersion operation: Please do not provide other FunctionCode parameters when providing a ZipFile.</p>
  </blockquote>