This Serverless plugins validates the compiled Cloudformation template prior to deployment
First, add Serverless Cloudformation Validation to your project:
npm install --save-dev @waracle/serverless-cloudformation-validation
Then inside your project's serverless.yml file add following entry to the plugins section: serverless-cloudformation-validation-plugin.
If there is no plugin section you will need to add it to the file.
Note that the "plugin" section for serverless-cloudformation-validation must be at root level on serverless.yml.
It should look something like this:
plugins:
- '@waracle/serverless-cloudformation-validation'
None. This plugin is invoked using events triggered by Serverless
Run npm build
to transpile the TypeScript into JavaScript
Run npm test
to run the Jest unit test suite
Run npm run lint
to ensure the code is linted correctly.
Running npm run lint:fix
will instruct eslint to attempt to fix the linting warnings/errors
We attempt to follow the Angular Commit Message format for commit messages so semantic-release.
Husky will run the linter on each commit
Pass --no-verify
to skip, eg git commit --no-verify
Husky will run the Jest test suite on each push, with test coverage and badge generation.
Pass --no-verify
to skip, eg git push origin main --no-verify
Handled by github actions, semantic-release will process the commits and determine the next version to publish to npm.
This plugin was initially an idea to prevent long deployments failing due to valid YAML but invalid Cloudformation resources.
Yes, thank you! This plugin is community-driven, most of its features are from different authors. Please update the docs and tests and add your name to the package.json file. We try to follow Airbnb's JavaScript Style Guide.