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

aws-stepfunctions-tasks: Enable creation of 'sync' states for AWS optimized integrations #21915

Closed
2 tasks
lucascott opened this issue Sep 4, 2022 · 5 comments · Fixed by #29015
Closed
2 tasks
Labels
@aws-cdk/aws-stepfunctions-tasks effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@lucascott
Copy link

lucascott commented Sep 4, 2022

Describe the feature

For integrated services such as AWS Batch and Amazon ECS, Step Functions can wait for a request to complete before progressing to the next state. To have Step Functions wait, specify the "Resource" field in your task state definition with the .sync suffix appended after the resource URI.

https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync

This feature is not yet available in CDK.

Use Case

Creating synchronized state machines

Proposed Solution

Add syncronized property of type boolean to all optimized integration tasks that support it.
If set, the resource key for the task will concatenate the .sync suffix at the end of the value.

Example:

from "Resource": "arn:aws:states:::batch:submitJob" to (with syncronized: true) "Resource": "arn:aws:states:::batch:submitJob.sync",

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.40.0 (build 56ba2ab)

Environment details (OS name and version, etc.)

Ubuntu 20.04.4 LTS

@lucascott lucascott added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 4, 2022
@lucascott lucascott changed the title aws_stepfunctions_tasks: Enable creation of 'sync' states for AWS optimized integrations aws-stepfunctions-tasks: Enable creation of 'sync' states for AWS optimized integrations Sep 4, 2022
@kaizencc kaizencc added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 7, 2022
@kaizencc
Copy link
Contributor

kaizencc commented Sep 7, 2022

As always, we can use customState as a workaround. Would be happy to accept a contribution for this!

@kaizencc kaizencc removed their assignment Sep 7, 2022
@psalvaggio-dl
Copy link

+1 on this issue. This would be a big help!

@lucascott
Copy link
Author

From further research, the feature is already available yet not well documented. The way to define synchronous optimized integration steps (for those steps that support it) in CDK is by specifying the integration pattern property.

See

readonly integrationPattern?: IntegrationPattern;

import {IntegrationPattern} from "aws-cdk-lib/aws-stepfunctions";
// ...
{
// ...other params
integrationPattern: IntegrationPattern.RUN_JOB
}

@github-actions
Copy link

github-actions bot commented Jan 3, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

mergify bot pushed a commit that referenced this issue Feb 7, 2024
### Issue # (if applicable)

Closes #21915 . (Doesn't close it, but solves a point that was mentioned here)

### Reason for this change

The prop is pretty useful, but hasn't received enough documentation from my perspective. This adds documentation to the overview `README` as well it's own jsdoc.

### Description of changes

Added a section for the `integrationPattern` into the README, and updated the jsdoc to include more detailed information.

### Description of how you validated changes

No validation.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TheRealAmazonKendra pushed a commit that referenced this issue Feb 9, 2024
### Issue # (if applicable)

Closes #21915 . (Doesn't close it, but solves a point that was mentioned here)

### Reason for this change

The prop is pretty useful, but hasn't received enough documentation from my perspective. This adds documentation to the overview `README` as well it's own jsdoc.

### Description of changes

Added a section for the `integrationPattern` into the README, and updated the jsdoc to include more detailed information.

### Description of how you validated changes

No validation.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@lauragalera
Copy link

I've tried IntegrationPattern.RUN_JOB and it seems to be ignored on my GlueStartJobRun() construct. Code example on this other issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions-tasks effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants