Skip to content
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

Cold start time and package size too high #183

Open
Dizzzmas opened this issue Sep 5, 2020 · 0 comments
Open

Cold start time and package size too high #183

Dizzzmas opened this issue Sep 5, 2020 · 0 comments

Comments

@Dizzzmas
Copy link

Dizzzmas commented Sep 5, 2020

Problem

Lambda cold start with this setup takes around 1ms which seems to be a bit too high, considering that if used with RDS and an ORM it would probably go even higher. Also, the package size is around 6MB which is sub-optimal.

I'd love to see these issues addressed or at least some help with how to get on track towards solving them.

What I tried

serverless-plugin-optimize and serverless-plugin-webpack

This has resulted in the following error:

{
    "errorType": "Error",
    "errorMessage": "Unable to find package.json in any of:\n[/var/task/_optimize/serverless-graphql-dev-graphql,\n/var/task]",
    "stack": [
        "Error: Unable to find package.json in any of:",
        "[/var/task/_optimize/serverless-graphql-dev-graphql,",
        "/var/task]",
        "    at init (/var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:61126:35)",
        "    at Object.463.. (/var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:61161:29)",
        "    at o (/var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:43:17)",
        "    at /var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:43:75",
        "    at Object.1../core/injector (/var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:47:17)",
        "    at o (/var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:43:17)",
        "    at /var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:43:75",
        "    at Object.12../dist/aws-wrapper (/var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:174:38)",
        "    at o (/var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:43:17)",
        "    at r (/var/task/_optimize/serverless-graphql-dev-graphql/lambda.js:45:9)"
    ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant