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

I want to specify the waiting time by parameter. #602

Open
DogFortune opened this issue Feb 15, 2024 · 0 comments
Open

I want to specify the waiting time by parameter. #602

DogFortune opened this issue Feb 15, 2024 · 0 comments

Comments

@DogFortune
Copy link

This is a Question

Description

I want to adjust the waiting time of a state machine with a parameter, but I am having trouble with a validation error.
A simple structure of a state machine is described here for reference.

name: sample-statemachine
definition:
  StartAt: wait
  States:
    wait:
      Type: Wait
      Seconds: ${param:intervalSeconds}
      Next: status_ok
    status_ok:
      Type: Pass
      End: true

The deployment commands are as follows

npx sls deploy --verbose \
--stage dev \
--param="intervalSeconds=60"

command, I get an error.

Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED: Expected value of type Integer at /States/wait/Seconds'

When the "print" command is executed, it is indeed a string where an integer should be.

    sample:
      name: sample-statemachine
      definition:
        StartAt: wait
        States:
          wait:
            Type: Wait
            Seconds: '60'  # not integer
            Next: status_ok
          status_ok:
            Type: Pass
            End: true

It would be very helpful if you could tell me if there is a way to make the command successful.

Additional Data

Serverless Framework Core Version you're using:
serverless v3.38.0

The Plugin Version you're using:

  • serverless-step-functions v3.19.0
  • serverless-prune-plugin v2.0.2
  • serverless-python-requirements v6.0.1
  • serverless-better-credentials v2.0.0

Operating System:

  • macOS Monterey v12.6.8
  • Node.js v20.11.0
  • npm v10.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants