I am creating a AWS Lambda python deployment package. I am using one external dependency requests . I installed the external dependency using the AWS documentation http://do
A perspective from 2019:
AWS Lambda now supports Python 3.7, which many people (including myself) choose to use as the runtime for inline lambdas.
Then I had to import an external dependency and I followed AWS Docs as the OP referred to. (local install --> zip --> upload).
I had the import module error and I realised my local PC had Python 2.7 as the default Python. When I invoked pip, it installed my dependency for Python 2.7.
So I switched locally to the Python version that matches the selected runtime version in the lambda console and then re-installed the external dependencies. This solved the problem for me. E.g.:
$ python3 -m pip install --target path/to/lambda_file