apigateway: StepFunctionsIntegrations add default methodResponses #27520
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
When StepFunctionsIntegrations is used, it creates methodResponses for 200, 400 and 500 and it's not possible to override this behaviour.
Use Case
When custom responses are provided they may clash with default ones.
For example one may want setup a different responseTemplate from the one provided.
For example I have a state machine that returns an URL and my responseTemplate set the http status to 302.
Proposed Solution
Adding a
useDefaultMethodResponses?: boolean
prop (default true) to theStepFunctionsExecutionIntegrationOptions
interface to avoid adding default responses:https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.ts#L160
Other Information
No response
Acknowledgements
CDK version used
2.100
Environment details (OS name and version, etc.)
MacOs Sonoma
The text was updated successfully, but these errors were encountered: