Its been a while since I've done this but don't let the linux instance deter you, its really very simple. If I remember correctly the linux machine was needed for compilation and running the scripts...I'm unfamiliar with the linux package for Conda. I've attached some notes I made a few years ago - They're probably pretty dated. Good luck.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Built EC2 instance using Amazon Linux AMI (AWS Linux AMI for Lambda)
http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html
Use Putty to connect to Linux machine from windows
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html
Download WinSCP to transfer between Windows and Linux:
https://winscp.net/eng/download.php
Use this workflow steps 5 through 9
http://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-deployment-pkg.html
5. Install Python 3.6 and virtualenv using the following steps:
sudo yum install -y gcc zlib zlib-devel openssl openssl-devel
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
tar -xzvf Python-3.6.1.tgz
cd Python-3.6.1 && ./configure && make
sudo make install
sudo /usr/local/bin/pip3 install virtualenv
6. Choose the virtual environment that was installed via pip3
/usr/local/bin/virtualenv ~/shrink_venv
source ~/shrink_venv/bin/activate
7. Install libraries in the virtual environment
pip install Pillow
pip install boto3
8. Add the contents of lib and lib64 site-packages to your .zip file.
cd $VIRTUAL_ENV/lib/python3.6/site-packages
zip -r9 ~/CreateThumbnail.zip *
9. Add your python code to the .zip file
cd ~
zip -g CreateThumbnail.zip CreateThumbnail.py
I couldn’t get the py file added to the zip so I copied the zip back to the windows environment and simply rezipped the original contents along with the py file. Loaded that to AWS Lambda…