-
Notifications
You must be signed in to change notification settings - Fork 185
Client library is too large to use with in-browser lambda IDE #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @nate, We had a similar issue #43 - where we reduced client size to size compatible with AWS Lambda. The deployment image has a limit to 50MB - https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html, but the Console editor only 3MB. I will take a look how we can reduce size of client. Meanwhile you could move the influxdb-client into Lambda Layer - https://aws.amazon.com/blogs/aws/new-for-aws-lambda-use-any-programming-language-and-share-common-components/. Regards |
I don't think so that we are able to reduce the size of client under 1MB 😞. The InfluxDB v2 API is too large and only the generated code from a swagger has almost 1MB (influxdb_client/domain, influxdb_client/sevice). I suppose that we could prepare and maintain public Lambda Layer with This Lambda Layer will allows to user use the client together with in-browser lambda IDE. What do you think? Is it right way? Regards |
I discussed this with Russ and we think packaging up the client library as a layer as part of the build would be very useful. This article points out several folks that are taking advantage of lambda layers - https://aws.amazon.com/blogs/apn/apn-partners-offer-lambda-layers-and-custom-runtimes/ I do not think every client should be offered as a layer to start with, but I think there is a good case for the NodeJS and Python client libraries. Because we want to track usage, the user-agent should be set with a name that reflects that the client library is being used in a layer. If you follow some of the details in offering the layer, we need to provide the ARN. I do not believe we distribute any ARNs today, so we will likely need to coordinate with our SRE team to find the proper home. |
@nisley thanks for detail info |
I noticed today when investigating layers different companies put out that layers have the same region requirement as lambdas. That means you will need to publish the layer in each region that Lambda supports (or that we want to support) with a corresponding ARN. |
The docs how to deploy the Python client into AWD Lambda Layer: https://github.com/influxdata/influxdb-client-python/tree/master/docker/aws_lambda_layer |
The AWS Lambda in-line Python IDE:
https://docs.aws.amazon.com/lambda/latest/dg/code-editor.html
stops being functional after the lambda python package gets bigger than 3MB. When I followed the directions to add the influxdb-client library to my lamda I found the library was over 4MB:
https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-dependencies
Any way to get the < 1MB in size?
The text was updated successfully, but these errors were encountered: