Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Add support for step functions alarms #214

Open
bhedia opened this issue Mar 23, 2022 · 1 comment
Open

Add support for step functions alarms #214

bhedia opened this issue Mar 23, 2022 · 1 comment

Comments

@bhedia
Copy link

bhedia commented Mar 23, 2022

Feature Proposal

Serverless supports deploying AWS Step Functions, but this plugin does not seem to support adding CW alarms for Step Functions.

When I try to use this plugin to configure alarms for step functions, here's what I get:

serverless.yaml:

custom:
  regionAlias: ${opt:regionAlias, 'uw1'}
  alerts:
    topics:
      alarm:
        topic: arn:aws:sns:#{AWS::Region}:#{AWS::AccountId}:alarm-topic-${self:provider.stage}
    definitions:
      executionsTimedOut:
        namespace: 'AWS/States'
        metric: ExecutionsTimedOut
        threshold: 1
        statistic: Sum
        period: 3600
        evaluationPeriods: 1
        datapointsToAlarm: 1
        comparisonOperator: GreaterThanOrEqualToThreshold
        treatMissingData: missing
    alarms:
      - executionsTimedOut

stepFunctions:
  stateMachines:
    helloWorld:
      alarms:
        - executionsTimedOut
      definition:
        StartAt: SayHelloWorld
        States:
          SayHelloWorld:
            Type: Pass
            End: true

Error:
State machine [helloWorld] is malformed. Please check the README for more info. ValidationError: child "alarms" fails because ["alarms" must be an object]

@hdinizribeiro
Copy link

For the ones that are looking for including alarms for step functions.
The step function plugin already provides it built-in:
https://www.serverless.com/plugins/serverless-step-functions#cloudwatch-alarms

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

No branches or pull requests

2 participants