-
Notifications
You must be signed in to change notification settings - Fork 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
@aws-cdk/aws-apigateway module: Add ability to reference execution log group ARN or Name #15816
Comments
As far as I am aware, the |
@nija-at it does create log groups for execution logs. If you want access logs then you create the log group yourself and pass it to RestApi |
@covertbert - unfortunately, the CDK does not create these execution logs. They are created automatically by the API Gateway service. It seems that the log group is always of the format aws-cdk/packages/@aws-cdk/aws-lambda/lib/function.ts Lines 850 to 859 in 2023004
A workaround is to simply refer the log group by using I am unassigning and marking this issue as We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. We accept pull requests if you are interested in contributing this feature. |
@nija-at makes sense. The only problem with referencing by a hard-coded ID is that IDs can change when resources are recreated. I was kinda hoping that you'd be able to expose the current ID dynamically. Appreciate this is low priority though, thanks for looking into it. |
You should not hardcode the id. Instead, you use |
Ahh that makes sense, thanks! Edit: But surely the restApiId is not the same as log group id needed in |
Worth noting for anyone stopping by here, that |
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
yup |
It would be nice to specify execution log group. |
Adding the ability to reference the log group ARN or name that is generated by the
RestApi
construct.Use Case
To be able to do anything at all with the log group that gets generated (e.g. add a subscription filter) you need to be able to dynamically reference the name or ARN.
Proposed Solution
Either:
Create a readonly property on the instantiated
RestApi
class calledlogGroupName
orlogGroupArn
that can be referenced by other constructs.Or, add the ability to set the execution log group name (like you can with access logs) so that you can have a consistent name to reference the log group by.
👋 I may be able to implement this feature request
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: