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

(lambda): Provide a way to specify a log group for a lambda function #11755

Closed
2 tasks
kastork opened this issue Nov 27, 2020 · 2 comments
Closed
2 tasks

(lambda): Provide a way to specify a log group for a lambda function #11755

kastork opened this issue Nov 27, 2020 · 2 comments
Assignees
Labels
@aws-cdk/aws-lambda Related to AWS Lambda closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@kastork
Copy link

kastork commented Nov 27, 2020

Provide a way to specify a log group for a lambda function.

Use Case

In my environment, security policy prevents the deletion of log groups and streams by normal system operators.
When developing, it is common to deploy the lambda many times, and in this environment, that means every deployment creates a new log group.

I'd like to treat the log group in a logical way by saying "for this function, the logs are always at this location"

I do this by creating the log groups separately, as a high level system feature, then deploy applications that use them.

Proposed Solution

This is as of Typescript CDK version 1.75.0

Currently, CDK does allow you to retrieve log groups, but it does not allow you to set the retrieved group as the log group for the lambda function.

I suggest that the Function construct have an optional constructor parameter to set this.

Other

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

This is a 🚀 Feature Request

@kastork kastork added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 27, 2020
@SomayaB SomayaB changed the title Provide a way to specify a log group for a lambda function (lambda): Provide a way to specify a log group for a lambda function Nov 30, 2020
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Nov 30, 2020
@nija-at
Copy link
Contributor

nija-at commented Nov 30, 2020

Unfortunately, this is not possible. The location of the logs for a lambda function is determined by the lambda backend service. Last I checked, they do not provide an option to specify/change this.

@nija-at nija-at added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Nov 30, 2020
@kastork kastork closed this as completed Nov 30, 2020
@github-actions
Copy link

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants