0

Just to note I did already post this on SO but no response hoping here works because I am truly stuck. Day 4 of this fight...

I am trying to create some lambda functions using the serverless package on npm. I had something similar working before but now with a new state and stage flag, it will not work. Below is the serverless.yml file (mostly) and I am getting 'none' as the results of endpoints/functions/layers

What am I missing that it will not create anything for me?

functions:
    fetchAlerts:
      handler: handler.fetchAlerts
      events:
      - sns: arn:aws:sns:us-east-1:<account ID>:monitor_failures-${opt:stage}
    sendFirstAlert:
      handler: handler.sendFirstAlert
    sendFollowUp:
      handler: handler.sendFollowUp
    responded:
      handler: handler.responded

# Setup the step function flow
  stepFunctions:
    stateMachines:
      send-alerts:
        name: sendAlerts
        definition:
          Comment: "This state machine sends the alerts for PAE"
          StartAt: fetchAlerts
          States:
            fetchAlerts:
              Type: Task
              Resource: "arn:aws:lambda:us-east-1:<account ID>:function:${self:service}-${opt:stage}-fetchAlerts"
              Next: sendFirstAlert
            sendFirstAlert:
              Type: Task
              Resource: "arn:aws:lambda:us-east-1:<account ID>:function:${self:service}-${opt:stage}-sendFirstAlert"
              End: true
            wait_init_10_seconds: 
              Type: Wait
              Seconds: '10'
              Next: RespondedChoice
            RespondedChoice:
              Type: Choice
              Choices:
                - Variable: $.var
                  NumericEquals: 0
                  Next: sendFollowUp

                - Variable: $.var
                  NumericEquals: 1
                  Next: responded
            sendFollowUp:
              Type: Task
              Resource: "arn:aws:lambda:us-east-1:<account ID>:function:${self:service}-${opt:stage}-sendFollowUp"
              End: true
            responded:
              Type: Task
              Resource: "arn:aws:lambda:us-east-1:<account ID>:function:${self:service}-${opt:stage}-responded"
              End: true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.