Skip to content

Event source types - Schedule #1142

Closed
Closed

Description

@dvorontsov

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.

Activity

  1. ShreyaGangishetty commented on Sep 25, 2019

    @ShreyaGangishetty

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions