Skip to content
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

Event source types - Schedule #1142

Closed
dvorontsov opened this issue Sep 16, 2019 · 1 comment
Closed

Event source types - Schedule #1142

dvorontsov opened this issue Sep 16, 2019 · 1 comment

Comments

@dvorontsov
Copy link

Description:
Enabled property of Schedule event source type is not working. https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#schedule

Steps to reproduce the issue:

  1. Create Schedule event source type for a function.
  2. Make sure to add Enabled: False (default will be "true")
  3. Deploy to AWS

Observed result:
Enabled: False property is ignored. In addition, when running such template through sam validate command, it results in error with property Enabled not defined for resource of type Schedule message.

Expected result:
Lambda trigger expected to be disabled.

@ShreyaGangishetty
Copy link

@dvorontsov sam validate is throwing errors because you might have an older version of aws-sam-cli. Enabled property of Schedule event is supported from 0.22.0 version onwards.

You can check your sam version with command: sam --version
You can upgrade your sam by running: brew upgrade aws-sam-cli

The Enabled: False property is not ignored by CloudFormation. There is a Schedule event rule (that can be enabled /disabled) as well as a trigger in the Lambda UI that can be enabled / disabled). The Lambda UI is showing the trigger state, which is enabled. However, the Schedule event rule is disabled (you can see by clicking the resource of resource type AWS::Events::Rule) in CloudFormation Stack. If either the trigger or the Rule is disabled, it won't trigger your Lambda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants