(aws-apigateway): No Deployment for imported RestAPI after adding resources or methods #12589
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
guidance
Question that needs advice or information.
needs-triage
This issue or PR still needs to be triaged.
❓ General Issue
The Question
I have created an api gateway like:
const restAPI = newRestApi(this, 'APIGateway', { deploy: true, deployOptions: { stageName: 'dev', description: 'dev stage', }, });
In a different stack I want to use the gateway to add new resources and methods from lambda functions, like deploying different separated lambda applications to the same gateway.
I imported the RestApi like this:
const restApi = RestApi.fromRestApiAttributes(this, 'RestApi', { ... });
I add a new resource and method for the lambda I want to add as a gateway endpoint:
const integration = restApi.root.addResource('test').addMethod('GET', new LambdaIntegration(testLambda));
Issue
In the aws console I can see the new resource 'test' as well as the new method, but there is no new deployment in the DEV Stage.
MIght this be in issue with the CDK or am I doing this wrong?
Environment
The text was updated successfully, but these errors were encountered: