-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Can no longer deploy Cloudformation where API Gateway is in a different file than the Lambda #335
Comments
Is this error fixed for you? What wonders me the most is that, how did you ever made it working as we couldn't ever extract our API Gateway out from the SAM Template file as the SAM would fail with error "The RestApiId must be a valid reference of serverless:api type resource in the same template file". Would you mind sharing your Api gateway SAM file (or did you use plain CF and not SAM) that you used to create the Api Gateway? |
We tried to redeploy today and we received the same error as before, so the issue has not been resolved. This is our api.yaml:
The exported value is then referenced in the lambda resource as seen in the original post. We had this on two projects and both stopped working. One of the projects was in production so it caused us a bit of a problem. |
Any updates on what you did to resolve this (if you did)? Running into the same issues. |
We currently only support |
We had to separate our API Gateway put it in one file (api.yaml) and have our lambdas in another (serverless.yaml), and then have the API being a imported value in serverless.yaml
This was never an issue up until a week ago, where we now receive the following error:
Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Transform AWS::Serverless-2016-10-31 failed with: Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [BaseRequest] is invalid. Event with id [PostResource] is invalid. RestApiId must be a valid reference to an 'AWS::Serverless::Api' resource in same templatemake
One option would be to move the depending Lambda to api.yaml but we would like to have all of our Lambdas together in one file.
The text was updated successfully, but these errors were encountered: