I am working in a serverless project with AWS (a kind of call center, using Twilio). I have previously built another 2-3 little projects. I am using Serverless Framework now, though. I didn't use it so far. So I am quite a newbie in both, AWS and Serverless.
I am somehow following the next link: https://serverless.com/blog/flask-python-rest-api-serverless-lambda-dynamodb/
So I am basically using this Python dependecies: Flask, Twilio, boto3 (for AWS). See requirements.txt below. I uninstalled some packages, however there probably are some packages I could clean:
boto3==1.9.84
botocore==1.12.84
certifi==2018.11.29
chardet==3.0.4
Click==7.0
docutils==0.14
Flask==1.0.2
idna==2.8
itsdangerous==1.1.0
Jinja2==2.10
jmespath==0.9.3
lazy-object-proxy==1.3.1
MarkupSafe==1.1.0
pipdeptree==0.13.2
PyJWT==1.7.1
PySocks==1.6.8
python-dateutil==2.7.5
pytz==2018.9
requests==2.21.0
s3transfer==0.1.13
six==1.12.0
twilio==6.23.1
urllib3==1.24.1
Using Serverless Framework I was able to deploy (serverless deploy) the project without issues until I installed boto3. However, now I exceed allowed dependency size and get this error:
An error occurred: AppLambdaFunction - Unzipped size must be smaller than 262144000 bytes (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
I'm stuck on this. I guess I could solve it the old way, without using Serverless Framework (directly in AWS), but I would ideally like to solve this issue.
Is it possible to partially install boto3? I mean, a way to install just the modules I need.
Any other idea?
Thanks in advance.