-
Notifications
You must be signed in to change notification settings - Fork 232
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
Unable to create basepath mapping when using Fn::ImportValue for restApiId in serverless.yml #219
Comments
I made PR#220 which will resolve this issue. |
Hi there! Thanks for doing this - sorry we've been behind on responding to these issues/PRs. We'll try to get to this soon. |
Hi there! Leaving a workaround which I did (DO not like adding extra sls-plugin :( )
In my case, I already have defined _ ApiGatewayRestApi_ as AWS::ApiGateway::RestApi in resource section of serverless.yml, and I think that in TC case whole ImportValue can be put as well |
Given the fix has not been merged after months, looks like stating #220 as dependency is the way to go :( |
Still no news on this issue ? |
This didn't work for me, does it still work in your project with latest versions (3.3.0) ? "ApiGW" is the name of the CF resource "AWS::ApiGateway::RestApi". |
Hello I encountered the same issue on this. My ApiGateway is defined in an additional stack. I found a fix by referencing restApiId with the ${cf:} helper instead of ImportValue :
https://serverless.com/framework/docs/providers/aws/guide/variables#reference-cloudformation-outputs |
Community Note
Bug Report
Error Description
I have defined restApiId in my serverless.yml like this:
But after upgrading to version
3.2.1
it fails. The previous version use Cloudformation but 3.x uses api, so now it fails because restApiId is not available as it has defined as an object.Command Run
sls deploy
Console Output
Versions
The text was updated successfully, but these errors were encountered: