apigateway: Use existing RestAPI to create CloudFront distribution #32332
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
Current AWS CDK does not give the possibility to use an existing RestAPI (RestApiBase) to create a stack for Cloudfront distributions. Add a static method to RestApiBase to refer to an existing RestApi and a certain stage.
Use Case
I have some existing RestApi's in the API Gateway. I want to use a Cloudfront distribution for them and use AWS CDK to create these distributions.
Proposed Solution
The current code is missing fields to properly determine all necessary info. Include stage-name for creating a RestApiBase will probably help.
This code fails:
Other Information
I am trying to use a proxy-lambda with apigateway integration to connect to a cloudfront distribution.
Acknowledgements
CDK version used
2.171.0
Environment details (OS name and version, etc.)
Apple M1 Max Macos Sequoia 15.1.1 (24B91)
The text was updated successfully, but these errors were encountered: