AWS::Lambda::Function pre-sign-up-validator Unzipped size must be smaller than 262144000 bytes
See original GitHub issueWhile I’m deploying a Booster application this error is displayed and, consequently, a rollback occurs, preventing boost from creating all elements in AWS:
26/57 | 11:12:17 | CREATE_FAILED | AWS::Lambda::Function | pre-sign-up-validator (presignupvalidator8052074C) Unzipped size must be smaller than 262144000 bytes (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 2798c5eb-e996-4112-a8a8-439fa4f6636d)
new Function (/booster_project/node_modules/@aws-cdk/aws-lambda/lib/function.ts:460:35)
\_ AuthStack.buildUserPool (/booster_project/node_modules/@boostercloud/framework-provider-aws-infrastructure/dist/infrastructure/stacks/auth-stack.js:26:33)
\_ AuthStack.build (/booster_project/node_modules/@boostercloud/framework-provider-aws-infrastructure/dist/infrastructure/stacks/auth-stack.js:19:35)
\_ ApplicationStackBuilder.buildOn (/booster_project/node_modules/@boostercloud/framework-provider-aws-infrastructure/dist/infrastructure/stacks/application-stack.js:27:62)
\_ assemble (/booster_project/node_modules/@boostercloud/framework-provider-aws-infrastructure/dist/infrastructure/index.js:46:61)
\_ Object.synthesizer (/booster_project/node_modules/@boostercloud/framework-provider-aws-infrastructure/dist/infrastructure/index.js:72:44)
\_ AppStacks.synthesizeStacks (/booster_project/node_modules/aws-cdk/lib/api/cxapp/stacks.ts:205:41)
\_ AppStacks.listStacks (/booster_project/node_modules/aws-cdk/lib/api/cxapp/stacks.ts:179:33)
\_ deployApp (/booster_project/node_modules/@boostercloud/framework-provider-aws-infrastructure/dist/infrastructure/index.js:59:38)
\_ processTicksAndRejections (internal/process/task_queues.js:93:5)
I’m using MacOS and Booster 0.5.1. Here I attach my package.json:
{
"name": "booster_project",
"description": "",
"version": "0.1.0",
"author": "",
"dependencies": {
"@boostercloud/framework-core": "^0.5.1",
"@boostercloud/framework-types": "^0.5.1",
"@boostercloud/framework-provider-aws": "*",
"@types/dotenv": "^8.2.0",
"apollo-cache-inmemory": "^1.6.6",
"apollo-client": "^2.6.10",
"apollo-link-http": "^1.5.17",
"aws-sdk": "^2.695.0",
"cross-fetch": "^3.0.4",
"dotenv": "^8.2.0",
"firebase-admin": "^8.12.1",
"graphql-tag": "^2.10.3"
},
"devDependencies": {
"@boostercloud/cli": "^0.5.1",
"@boostercloud/framework-provider-aws-infrastructure": "*",
"@types/faker": "^4.1.12",
"@types/node": "^13.5.1",
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"chai": "^4.2.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-prettier": "^3.1.2",
"faker": "^4.1.0",
"mocha": "^7.0.1",
"nyc": "^15.0.0",
"prettier": "^1.19.1",
"rimraf": "^3.0.1",
"ts-node": "^8.6.2",
"typescript": "^3.7.5",
"@types/chai": "^4.2.7",
"@types/chai-as-promised": "^7.1.2",
"@types/mocha": "^7.0.2"
},
"engines": {
"node": ">=8.0.0"
},
"homepage": "",
"license": "MIT",
"main": "dist/index.js",
"repository": "",
"scripts": {
"lint:check": "eslint --ext '.js,.ts' **/*.ts",
"lint:fix": "eslint --quiet --fix --ext '.js,.ts' **/*.ts",
"compile": "tsc -b tsconfig.json",
"deploy": "boost deploy",
"clean": "rimraf ./dist tsconfig.tsbuildinfo",
"test:unit": "",
"test:integration": "AWS_SDK_LOAD_CONFIG=true nyc --extension .ts mocha --forbid-only \"tests/**/*.test.ts\" --config \"tests/integration/.mocharc.yml\""
},
"types": "lib/index.d.ts"
}
I believe that the package aws-sdk is causing the problem.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Unzipped size must be smaller than 262144000 bytes - AWS ...
You can deploy a Lambda function using a Docker image and it bypasses this problem, allowing a function with its dependencies to be...
Read more >Unzipped size must be smaller than xxxx bytes - Seed.run
... LambdaFunction - Unzipped size must be smaller than 262144000 bytes ... Once AWS unzips them, the entire directory needs to be smaller...
Read more >Unzipped size must be smaller than 262144000 bytes - Reddit
Hi ! I'm very new to AWS / Serverless. I'm trying to deploy a Lambda with serverless. I have dummy code in handler.py...
Read more >Unzipped size must be smaller than 262144000 bytes. - AWS ...
While deploying a function to AWS Lambda I am getting this error. Unzipped size must be smaller than 262144000 bytes. Dev Guide: AWS...
Read more >class NodejsFunction (construct) · AWS CDK
VPC network to place Lambda network interfaces. Specify this if the Lambda function needs to access resources in a VPC. vpcSubnets? Type: SubnetSelection ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We finally got it. Thanks to @AdrianLorenzoDev Before getting to the solution, we tried using @javiertoledo approach of:
$ npm install --production --no-bin-links
andnpm install @boostercloud/framework-provider-aws-infrastructure --save-dev
with no luck.What we finally did was to:
There was no need to remove the dependencies from package.json. It worked like a charm and we are now able to deploy as normal
Interesting… how exactly did you use yarn? Was
yarn install
just enough? Did it actually reduce the size of the deployed zip? We should make sure that we understand why this worked…