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-apigateway-sqs creates a path /message for the delete method, even when the DELETE method is not allowed in the API. #1029

Closed
joe-king-sh opened this issue Nov 22, 2023 · 3 comments
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged

Comments

@joe-king-sh
Copy link
Contributor

joe-king-sh commented Nov 22, 2023

Thank you for the excellent custom construct. I am considering using this construct but have noticed a concerning issue, hence this bug report.

In aws-apigateway-sqs, if the DELETE /message path is not used, it can be disabled by setting allowDeleteOperation to false in the properties.

However, in the current implementation, although setting it to false prevents the creation of the DELETE Method, the /message path, which is not supposed to be used, is still added to the API Gateway.

Having a path added to the API Gateway that is not intended to be used does not seem to be the expected behavior.

Reproduction Steps

  new ApiGatewayToSqs(stack, 'api-gateway-sqs', {
    allowDeleteOperation: false
  });

Error Log

Generated template

    "testapigatewaysqsdefaultRestApimessage41073D7F": {
      "Type": "AWS::ApiGateway::Resource",
      "Properties": {
        "ParentId": {
          "Fn::GetAtt": [
            "testapigatewaysqsdefaultRestApi554243C3",
            "RootResourceId"
          ]
        },
        "PathPart": "message",
        "RestApiId": {
          "Ref": "testapigatewaysqsdefaultRestApi554243C3"
        }
      }
    },

Environment

  • **CDK CLI Version :2.105.0
  • **CDK Framework Version:2.105.0
  • **AWS Solutions Constructs Version :2.46.0
  • **OS :macOS Ventura 13.2.1
  • **Language :TypeScript

Other


This is 🐛 Bug Report

@joe-king-sh joe-king-sh added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels Nov 22, 2023
@biffgaut
Copy link
Contributor

Thanks - I'm confused by your example, shouldn't the Reproduction Steps set the value to false?

@biffgaut
Copy link
Contributor

Closed with PR1030

@joe-king-sh
Copy link
Contributor Author

@biffgaut
Sorry... you are correct. I have changed it to false.
Thank you for your prompt review and the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants