title: Uploading python libs to AWS lambda using Makefile
body: <p>I have been following a Youtube video to upload python libs on to AWS Lambda. The youtuber created this MakeFile, which created a folder called "package", in it a "tmp" folder and (PROJECT).zip:</p>
  
  <pre><code>install: virtual
  
  build: clean_package copy_python build_package_tmp remove_unused zip
  
  virtual:
      @echo "--&gt; Setup and activate virtualenv"
      if test ! -d "$(VIRTUAL_ENV)"; then pip install virtualenv; 
  virtualenv $(VIRTUAL_ENV); fi
      @echo ""
  
  clean_package:
      rm -rf ./package/*
  
  build_package_tmp:
      mkdir -p ./package/tmp/lib
      cp -R ./$(PROJECT)/. ./package/tmp/
  
  copy_python:
      if test -d $(VIRTUAL_ENV)lib; then \
          cp -a $(VIRTUAL)/lib/python2.7/site-packages/. ./package/tmp/;
      fi  
  
      if test -d $(VIRTUAL_ENV)/lib64; then \
          cp -a $(VIRTUAL)/lib/python2.7/site-packages/. ./package/tmp/
      fi
  
  remove_unused:
      rm -rf ./package/tmp/wheel*
      rm -rf ./package/tmp/easy-install*
      rm -rf ./package/tmp/setup-tools*
  
  zip:
      cd ./package/tmp &amp;&amp; zip -r ../$(PROJECT).zip .  
  </code></pre>
  
  <p>I got this error on the Linux console:</p>
  
  <pre><code>$make -f Maketest.mk build
  rm -rf ./package/*
  if test -d envlib; then \
      cp -a /lib/python2.7/site-packages/. ./package/tmp/; thenif test -d env/lib64/python2.7/site-packages/. ./package/tmp/; fi
  mkdir -p ./package/tmp/lib
  cp -R ./AWS/. ./package/tmp/
  cp: cannot stat './AWS/.': No such file or directory
  Maketest.mk:21: recipe for target 'build_package_tmp' failed
  make: *** [build_package_tmp] Error 1
  </code></pre>
  
  <p>The "package" is created, with only an empty "tmp".</p>
  
  <p>PS: I am new to AWS Lambda, so if there is a better way to upload using the Linux console, I would be very grateful :)</p>