Installing python package on AWS lambda
<p>I have deployed my <code>zipped</code> project without <code>psycopg2</code> package. I want to install this package on my <code>lambda</code> without re-uploading my fixed project (i haven't access to my project right now). How can i install this <code>package</code> on my <code>lambda</code>? Is it possible to do it with <code>pip</code>?</p>

<p>It is not possible to use <strong>pip directly on the lambda</strong>. Rather I use a custom build script to create zip package [this can give you a brief idea - it can certainly be made much simpler]</p>

<pre><code>rm -rf ~/devops/tempenv &gt; /dev/null
virtualenv ~/devops/tempenv
source ~/devops/tempenv/bin/activate
pip install SlackClient
pip install PyYaml
deactivate
rm -rf temp &gt; /dev/null
mkdir temp
rm aws-lambda.zip &gt; /dev/null
cp -r ~/devops/tempenv/lib/python2.7/site-packages/* temp/
cp *.py temp
cd temp
zip -r aws-lambda.zip .
mv aws-lambda.zip ../
cd ..
rm -rf temp
rm -rf ~/devops/tempenv
</code></pre>

python amazon-web-services pip aws-lambda psycopg2