Closed aluferraz closed 3 years ago
Hi, did you remove the development dependencies before deploying? Also make sure the dependencies are not installed from source (git). 1gb is huge indeed.
It might be worth looking into that directory.
See #254
Hi there,
Thanks a lot for your support ! I've created a vanilla Lumen project and the vendor folder has ~500mb (even installing with --no-dev).
Here is my config.json.
I see that now lambda supports EFS disks attached to it, maybe we could load the vendor folder from an EFS disk?
"name": "laravel/lumen", "description": "The Laravel Lumen Framework.", "keywords": ["framework", "laravel", "lumen"], "license": "MIT", "type": "project", "require": { "php": "^7.2.5", "bref/bref": "^0.5.29", "laravel/lumen-framework": "^7.0" }, "require-dev": { "fzaninotto/faker": "^1.9.1", "mockery/mockery": "^1.3.1", "phpunit/phpunit": "^8.5" }, "autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "classmap": [ "tests/" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }, "minimum-stability": "dev", "prefer-stable": true, "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ] } }
the vendor folder has ~500mb
That sounds very wrong. If you installed with --no-dev
then it may be that part posing the problem:
Also make sure the dependencies are not installed from source (git).
EFS is not fast enough (at the moment) to serve that many small files: https://www.youtube.com/watch?v=yJD7AQgfEJ8
Hi there,
I have a lot of composer dependencies in my API, which makes the vendor folder quite big (around 1gb)
When I try to deploy my application I receive the following error:
WebsiteLambdaFunction - Unzipped size must be smaller than 147391822 bytes
Is there workaround on that ?