Skip to content

Unable to use this library in AWS Lambda due to package size exceeded max limit #1200

@nemalipuri

Description

@nemalipuri

Please fill out the form below.

System Information

  • AWS Lambda:
  • Python v3.6:
  • Sagemaker Python SDK 1.49.0:

Describe the problem

I'm trying to use Sagemaker Python SDK in Lambda to trigger train and deploy steps. Packaged the dependencies along with function code and when trying to create Lambda function it is throwing error 'Unzipped size must be smaller than 262144000 bytes'

Sorry, though this issue is related to Lambda service limit I want to check is there anyway I can reduce the size of the dependencies?

I have tried removing boto3 and botocare from function zip file since Lambda provides these libraries but it lead to different issue 'expecting python-dateutil<2.8.1,>=2.1'

Minimal repro / logs

AWS Lambda error 'Unzipped size must be smaller than 262144000 bytes'

  • Exact command to reproduce:
    mkdir python
    cd python
    pip install sagemaker --target .
    chmod 777 python
    zip python directory
    Upload Zip file to S3
    Error when creating AWS Layer 'Failed to create layer version: Unzipped size must be smaller than 262144000 bytes'

Similarly, instead of Laye when packaged code with dependencies and uploading the zip file into Lambda function I received error 'Unzipped size must be smaller than 262144000 bytes'

Appreciate your help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions