I would recommend to use Lambda Layers. Here is the doc. So you need to create Lambda layer from S3 object and attach this layer to Lambda.