5

In AWS Step Functions, we can use parameters from previous steps as inputs using the following syntax.

"Parameters": {
        "Details": {
          "weight.$": "$.product.weight",
          "unit": "grams"
        }
      }

As an example, say product.weight. is 500. Can I configure a parameter that will receive a value of 500 grams?

For example, something like this:

"Parameters": {
        "Details": {
          "formatted_weight.$": "{$.product.weight} grams",
        }
      }

1 Answer 1

9

Use the States.Format intrinsic function to interpolate a string:

"Parameters": {
        "Details": {
          "formatted_weight.$": "States.Format('{} grams', $.product.weight)",
        }
      }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.