1 個回答
- 最新
- 最多得票
- 最多評論
0
Is the API Gateway stage created at the same time as this stack?
If the mapping is created before the API Gateway stage, the error message "Invalid stage identifier specified" may appear.
If they are created at the same time, try using "addDependency" and wait for the API Gateway stage to be created.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib-readme.html#dependencies
The following code may fix the problem.
const CfnBasePathMapping = new CfnBasePathMapping(this, myAPIMapping, { basePath: 'myapi', domainName: props.domainName.domainName, restApiId: myAPI.restApiId, stage: props.stage, });
CfnBasePathMapping.addDependency(myAPI);
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 10 個月前
- AWS 官方已更新 10 個月前