Skip to content

fix(apigateway): StepFunctions integration adds unmodifiable methodresponses#26720

Closed
rix0rrr wants to merge 9 commits intomainfrom
huijbers/stepfunctions-dont-add-methodresponse
Closed

fix(apigateway): StepFunctions integration adds unmodifiable methodresponses#26720
rix0rrr wants to merge 9 commits intomainfrom
huijbers/stepfunctions-dont-add-methodresponse

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented Aug 11, 2023

The StepFunctionsIntegration integration can produce 200, 400 or 500 status codes.

To make its usage more convenient, it also adds default methodResponses for each of those statuses; if it didn't do this, the user would have to define the 3 method responses every time it uses the integration. However, the problem comes if the user wants to modify the default method responses. This is currently not possible, as addMethodResponse will just add to the array, adding multiple entries for the same statusCode, of which CloudFormation will deploy one nondeterministically and the rest is lost.


This PR address this problem by adding a flag to StepFunctionsIntegration to disable adding the default method responses.

If the user wants to customize, they will have to redefine all method responses.

Sister PR to #26718.

Relates to #26586 and #26636.


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

@github-actions github-actions bot added the p2 label Aug 11, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team August 11, 2023 12:13
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 11, 2023
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 23d026a
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@rix0rrr
Copy link
Copy Markdown
Contributor Author

rix0rrr commented Aug 23, 2023

No one seems to need this change. Closing until we get interest on it.

@rix0rrr rix0rrr closed this Aug 23, 2023
@redvex
Copy link
Copy Markdown

redvex commented Oct 12, 2023

I'm interested in this change.

@rix0rrr rix0rrr deleted the huijbers/stepfunctions-dont-add-methodresponse branch November 12, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. p2 pr/do-not-merge This PR should not be merged at this time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants