aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

StepFunction Service Integration with DynamoDb

Open sacag opened this issue 6 years ago • 8 comments

Description

Seems like the service integration between step function and dynamodb api is missing? Or is it lack of documentation? See the below code snippet which works for publishing to SNS from step-function task. Cannot find anything to do the same for dynamodb.

var snsTopicTask = new Task(this, "snsTopicTask", new TaskProps
            {
                InputPath = "$",
                Task = new PublishToTopic(snsTopic, new PublishToTopicProps
                {
                    IntegrationPattern = ServiceIntegrationPattern.FIRE_AND_FORGET,
                    Message = TaskInput.FromDataAt("$.lambdaResult"),
                    Subject = $"Test subject"
                })
            });

Reproduction Steps

Cannot find a similar way to interact with Dynamodb in the step function task as you can see above for SNS (PublishToTopic).

Error Log

Environment

  • CLI Version:
  • Framework Version: 1.20
  • OS: Windows
  • Language: C#

Other


This is :bug: Bug Report

sacag avatar Jan 13 '20 21:01 sacag

Hi @sacag thanks for reporting this bug. In order to understand the issue better could you give us a full description of the issue you're encountering. You can just edit your initial post and add a description under the first section. Thanks!

SomayaB avatar Jan 13 '20 22:01 SomayaB

@SomayaB - Sorry, missed the bug description. Should be there now. Basically, there doesn't seem to be a way to access the dynamodb api from step functions in C# CDK. Although, the documentation says otherwise.

sacag avatar Jan 14 '20 01:01 sacag

@SomayaB - Any update on this issue?

sacag avatar Jan 15 '20 00:01 sacag

Thanks for adding a description @sacag! We're looking into this and will update this issue when there is movement.

SomayaB avatar Jan 15 '20 19:01 SomayaB

You are right that there are no pre-built constructs that expose this functionality right now. You can implement it yourself by implementing IStepFunctionsTask and returning the right fields.

rix0rrr avatar Jan 16 '20 12:01 rix0rrr

@rix0rrr - As of now we are creating a lambda function which interacts with the dynamodb and passes on the result to next task. Is there a timeline when a pre-built construct for this will be available for .NET?

sacag avatar Jan 16 '20 14:01 sacag

Hi @nija-at , Is this issue a duplicate of #6468 ?

ayush987goyal avatar Apr 03 '20 11:04 ayush987goyal

Looks like it. Thanks for fishing this out.

Resolving, @ayush987goyal has implemented this and will be available in the next CDK release.

nija-at avatar Apr 03 '20 12:04 nija-at