Deploying a Node serverless application, I get this error:
RobWeaver:AccountsCRUD robweaver$ sls deploy --stage dev --region us-west-2 --aws-profile wf-cloud-dev
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (89.61 MB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
....
Serverless: Operation failed!
Serverless Error ---------------------------------------
An error occurred: AccountsLambdaFunction - Unzipped size must be smaller than 262144000 bytes (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: b195b261-1901-11e9-adf8-a95628a382ff).
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: darwin
Node Version: 10.0.0
Serverless Version: 1.35.1
Sometimes simply rerunning succeeds, other times I resort to removing my node_modules and redoing npm install
RobWeaver:AccountsCRUD robweaver$ rm -rf build node_modules/
RobWeaver:AccountsCRUD robweaver$ npm install
> fsevents@1.2.4 install /Users/robweaver/Projects/cloud_eng/AccountsCRUD/node_modules/fsevents
> node install
[fsevents] Success: "/Users/robweaver/Projects/cloud_eng/AccountsCRUD/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
added 1844 packages from 1318 contributors and audited 36073 packages in 25.505s
found 0 vulnerabilities
RobWeaver:AccountsCRUD robweaver$ npm run build
> AccountREST@1.0.0 build /Users/robweaver/Projects/cloud_eng/AccountsCRUD
> react-scripts build
Creating an optimized production build...
Compiled with warnings.
./src/index.js
**Line 27:** 'MultiSelectFilter' is assigned a value but never used no-unused-vars
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
File sizes after gzip:
468.57 KB build/static/js/1.829cdcf9.chunk.js
4.63 KB build/static/js/main.3e4c74c6.chunk.js
763 B build/static/js/runtime~main.4a686d48.js
118 B build/static/css/main.e7e72d86.chunk.css
The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
Find out more about deployment here:
http://bit.ly/CRA-deploy
RobWeaver:AccountsCRUD robweaver$ sls deploy --stage dev --region us-west-2 --aws-profile wf-cloud-dev
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (81.1 MB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..............
Serverless: Stack update finished...
Service Information
service: AccountsCRUD
stage: dev
region: us-west-2
stack: AccountsCRUD-dev
api keys:
None
endpoints:
ANY - https://32ifhwcz4e.execute-api.us-west-2.amazonaws.com/dev/
ANY - https://32ifhwcz4e.execute-api.us-west-2.amazonaws.com/dev/{proxy+}
functions:
accounts: AccountsCRUD-dev-accounts
layers:
None
Serverless: Removing old service artifacts from S3...