1 Answer
- Newest
- Most votes
- Most comments
0
The ExecuteStatement is an asynchronous API, that means that you get back a statement ID that you then need to call DescribeStatement to check the status of the statement. When it finishes you can continue.
In your state machine you will add the ExecuteStatement step -> Wait state for a few seconds -> DescribeExecution step -> Choice state to check if it completed, and based on the result, either go back to the Wait state or go to the next step.
For some of the optimized integrations we have the .sync integration type that does it for you. RedShift is not one of them so you will need to do it yourself.
Relevant content
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
@Uri - just to clarify, are you recommending to use DescribeStatement or DescribeExecution? further do you have any reference blog / post to capture Id / Execution Arn and pass it to Describe state?
As far as I saw there is no DescribeExecution bur rather DescribeStatement, which gets the ID that was returned by ExecuteStatement.
I could not find some reference architecture, but this blog shows a similar approach.
Thanks @Uri - I am trying with your approach to complete this PoC... further i am accepting your answer.