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

AWS: Validate rate/cron syntax before Deploy #5635

merged 3 commits into from Dec 31, 2018


None yet
3 participants
Copy link

exoego commented Dec 30, 2018

What did you implement:

Closes #3306

How did you implement it:

  • Add validation to compileScheduledEvents so users can find error before deploy.
    • Note: cron validation checks only number of fields, since it requires very complex regex to validate full cron syntax.
  • Polish error message: include cron syntax and a link to doc.

How can we verify it:

Run test.


  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@exoego exoego force-pushed the exoego:cloudwatch-cron-valiation branch from 74ecf87 to cdb99e6 Dec 30, 2018

@exoego exoego force-pushed the exoego:cloudwatch-cron-valiation branch from cdb99e6 to b98afe7 Dec 30, 2018

@exoego exoego changed the title AWS: Validate rate/cron syntax for schedule events AWS: Validate rate/cron syntax before Deploy Dec 30, 2018

Copy link

horike37 left a comment

This is super nice! since it takes a long time to validate it CloidFormation side. that was annoying 😓
Just tested and works as expected and the code looks good from my perspective 👍

@horike37 horike37 merged commit db88024 into serverless:master Dec 31, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.007%) to 90.788%

@exoego exoego deleted the exoego:cloudwatch-cron-valiation branch Dec 31, 2018

dschep added a commit that referenced this pull request Jan 9, 2019

v1.36.0 release!
 - [Log AWS SDK calls in debug mode](#5604)
 - [Added currently supported regions for GCP functions](#5601)
 - [Update Cloudflare Templates](#5620)
 - [AWS: Validate rate/cron syntax before Deploy](#5635)
 - [Fix error log output](#5378)
 - [Support for native async/await in AWS Lambda for aws-nodejs-typescript template ](#5607)
 - [aws-csharp create template uses handler-specific artifact](#5411)
 - [change behaviour on initial stack create failed](#5631)
 - [Add warning for multiple functions having same handler](#5638)
 - [AWS: Add API Gateway stage name validation.](#5639)

@dschep dschep referenced this pull request Jan 9, 2019


v1.36.0 release! #5670

@shortjared shortjared added this to the 1.36.0 milestone Jan 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment