Skip to content
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

(custom-resources): CustomResourceProvider should allow configuring log group destination #27413

Open
2 tasks
AlJohri opened this issue Oct 5, 2023 · 6 comments
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources feature-request A feature should be added or improved. p2

Comments

@AlJohri
Copy link

AlJohri commented Oct 5, 2023

Describe the feature

The Custom Resource Provider Framework (particularly the Provider construct) should enable configuring the log group destination for both the lambdas and step functions that it automatically generates.

Use Case

I would like to centralize our entire application to use the same log group for easier observability. We utilize different stream prefixes to keep the logs organized across the various services.

Proposed Solution

No response

Other Information

Related: #26553

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.95.0 (build cfa7e88)

Environment details (OS name and version, etc.)

Amazon Linux 2

@AlJohri AlJohri added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 5, 2023
@github-actions github-actions bot added the @aws-cdk/custom-resources Related to AWS CDK Custom Resources label Oct 5, 2023
@indrora indrora added needs-design This feature request needs additional design work. feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature/pattern Feature requests related to high level L3 pattern libraries and removed needs-triage This issue or PR still needs to be triaged. labels Oct 5, 2023
@indrora
Copy link
Contributor

indrora commented Oct 5, 2023

Thank you so much for the feature request.

Since there's a good chance that other systems make use of a log group destination, it could be worth looking into Aspects as a way to override log groups: Aspects are checked just after your application has generated the framework for CloudFormation but before it's reified into full cloudformation structures.

if you'd like to offer a PR for this particular feature, we'd be more than happy to review it.

@peterwoodworth
Copy link
Contributor

Lambda functions will create their own log groups, you cannot customize the log group name or to use an existing log group as far as I know, which is why the existing solution is the way it is. Maybe I'm mixing up what you mean by "destination"?

@peterwoodworth peterwoodworth added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-design This feature request needs additional design work. feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature/pattern Feature requests related to high level L3 pattern libraries needs-review labels Oct 5, 2023
@AlJohri
Copy link
Author

AlJohri commented Oct 6, 2023

Lambda functions will create their own log groups, you cannot customize the log group name or to use an existing log group as far as I know, which is why the existing solution is the way it is. Maybe I'm mixing up what you mean by "destination"?

Thanks for the prompt response and clarification. I see that indeed even on the Function construct, there is no construct property for log group. Coming from the ECS world, I did not realize that you can't change the log group of a lambda.

In this case, there is also the internal "waiter state machine" for async custom providers where we could allow configuring the log group, but given we can't change the log group of the lambdas, this likely doesn't make much sense.

@AlJohri AlJohri closed this as completed Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@AlJohri
Copy link
Author

AlJohri commented Nov 18, 2023

Looks like customizing lambda log group is supported now: https://aws.amazon.com/blogs/compute/introducing-advanced-logging-controls-for-aws-lambda-functions/

@AlJohri AlJohri reopened this Nov 18, 2023
@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Nov 19, 2023
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2024
@khushail khushail reopened this Jul 31, 2024
@khushail khushail added the p2 label Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

4 participants