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: CallApiGatewayRestApiEndpoint assumes StateMachine and the API Gateway are in the same region #32289

Open
1 task
fulcus opened this issue Nov 26, 2024 · 3 comments
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. p2 package/tools Related to AWS CDK Tools or CLI

Comments

@fulcus
Copy link

fulcus commented Nov 26, 2024

Describe the bug

This code assumes that the API GW is in the same region as the step function, and there is no way to specify any other region.

return `${this.props.api.restApiId}.execute-api.${apiStack.region}.${apiStack.urlSuffix}`;

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

Be able to specify the region of the API GW.

Current Behavior

Construct assumes that SFn and API GW are in the same region.

Reproduction Steps

Read the code and try to use the CallApiGatewayRestApiEndpoint with an API in another region.

Possible Solution

A good fix would be to add the region as props to RestApi.fromRestApiAttributes, and use that to get the endpoint. Alternatively pass the region as props to CallApiGatewayRestApiEndpoint.

Additional Information/Context

No response

CDK CLI Version

2.162.1

Framework Version

No response

Node.js Version

18

OS

15.1

Language

TypeScript

Language Version

No response

Other information

No response

@fulcus fulcus added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 26, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Nov 26, 2024
@fulcus fulcus changed the title (module name): (short issue description) aws-stepfunctions-tasks: CallApiGatewayRestApiEndpoint assumes StateMachine and the API Gateway are in the same region Nov 26, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 and removed needs-triage This issue or PR still needs to be triaged. labels Nov 27, 2024
@khushail khushail self-assigned this Nov 27, 2024
@khushail
Copy link
Contributor

Hi @fulcus , thanks for reaching out. for cross-region support , we have this- CallAwsServiceCrossRegion and CallAWSServiceCrossRegionProps. Is this what you are looking for ?

@khushail khushail added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Nov 27, 2024
@fulcus
Copy link
Author

fulcus commented Nov 27, 2024

Hi, thanks for the response. That would surely work as a workaround, however it would be nice to have the native task allow the region option. But it seems that it should be rather integrated in all tasks, probably in the base class. Is this something you are planning to do?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Nov 28, 2024
@khushail
Copy link
Contributor

@fulcus , I am not really sure about this .
Requesting core team to provide inputs here as this is something being considered to be implemented in future or request to share insights on the issue analysis.

@khushail khushail removed their assignment Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

2 participants