aws-stepfunctions-tasks: CallApiGatewayRestApiEndpoint assumes StateMachine and the API Gateway are in the same region #32289
Labels
@aws-cdk/aws-stepfunctions-tasks
bug
This issue is a bug.
p2
package/tools
Related to AWS CDK Tools or CLI
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.
aws-cdk/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/apigateway/call-rest-api.ts
Line 68 in 060af6c
Regression Issue
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 toCallApiGatewayRestApiEndpoint
.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
The text was updated successfully, but these errors were encountered: