2

I am using StepFunctions query to get list of items in response and then pass response to parallel state and in parallel use map to do send SQS and update item. My Stepfunction flow looks like following Stepfunction flow

My issue is query response includes data types "S" in response that is making it's way into SQS and can't update dyanamodb

For e.g. the input to DynamoDB UpdateItem looks like : {"id": { "S": "2fc79eb4-5b7c-4c79-874b-*********" }}

How can I get rid of "S" from response.

J.S
  • 139
  • 2
  • 5

2 Answers2

0

For the issue of stripping "S" from response, I was able to achieve expected results by using

"Key": {
    "id": {
      "S.$": "$.id.S"
    }

But it still leaves datatype in SQS which makes further processing difficult.

J.S
  • 139
  • 2
  • 5
0

I am proposing an alternative solution.

What you could do is use a lambda to query the dynamo table and then use the lambda to return the result in a pretty format. While it requires you to call a lambda & dynamo it allows you with a little more flexibility.

The service integrations are great for some things, but they also have drawbacks.

men6288
  • 69
  • 8