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

VarOptions is messed up when a proxy and serverless http event have same path but different methods #143

Open
gorj-tessella opened this issue Dec 8, 2021 · 0 comments

Comments

@gorj-tessella
Copy link

I have an api where a particular path has GET, DELETE, and PUT methods attached. GET and DELETE are handled via serverless-apigateway-service-proxy, but PUT needs to be run through a regular http event (lambda). CORS is enabled. I found that the PUT request was blocked by cors, and when digging into cloudformation-update-template-stack.json found that:

  • "ApiGatewayMethodApiXXXVarOptions" was in ApiGatewayDeploymentXXX.DependsOn twice, unlike any other entry
  • But there was only one ApiGatewayMethodApiXXXVarOptions entry
  • That entry lacked the PUT option

I believe that both serverless-apigateway-service-proxy and regular serverless are trying to generate the ApiGatewayMethodApiXXXVarOptions entry, and one is essentially overwriting the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant