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

(aws-logs): support FieldIndexPolicies in LogGroup construct #33366

Closed
1 of 2 tasks
yashkh-amzn opened this issue Feb 10, 2025 · 2 comments · Fixed by #33416
Closed
1 of 2 tasks

(aws-logs): support FieldIndexPolicies in LogGroup construct #33366

yashkh-amzn opened this issue Feb 10, 2025 · 2 comments · Fixed by #33416
Labels
@aws-cdk/aws-logs Related to Amazon CloudWatch Logs effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. open-for-community-contribution We are welcoming community contributions for this one p3

Comments

@yashkh-amzn
Copy link
Contributor

Describe the feature

Field Indexing for CloudWatch Logs was launched in Nov 2024. This feature will enable that property under FieldIndexPolicies as a JSON object in the LogGroup construct.

Use Case

Amazon CloudWatch Logs introduces field indexes and enhanced log group selection to accelerate log analysis for faster troubleshooting, and easier identification of trends. A user can create up to 20 field indexes per log group, and once defined, all future logs matching the defined fields will remain indexed for up to 30 days.

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

CDK version used

2.178.1

Environment details (OS name and version, etc.)

Mac OS Sonoma v14.6.1

@yashkh-amzn yashkh-amzn added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 10, 2025
@github-actions github-actions bot added the @aws-cdk/aws-logs Related to Amazon CloudWatch Logs label Feb 10, 2025
@khushail khushail changed the title (aws-logs): (support FieldIndexPolicies in LogGroup construct) (aws-logs): support FieldIndexPolicies in LogGroup construct Feb 10, 2025
@khushail khushail self-assigned this Feb 10, 2025
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 10, 2025
@khushail
Copy link
Contributor

Hi @yashkh-amzn , thanks for requesting this. Since there is L1 support available for this property for cloudwatch logs , please feel free to submit a PR.

Thanks.

@khushail khushail added p3 and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Feb 10, 2025
@khushail khushail removed their assignment Feb 10, 2025
@khushail khushail added open-for-community-contribution We are welcoming community contributions for this one effort/small Small work item – less than a day of effort labels Feb 10, 2025
@mergify mergify bot closed this as completed in #33416 Mar 5, 2025
mergify bot pushed a commit that referenced this issue Mar 5, 2025
…uct (#33416)

### Issue # (if applicable)

#33366

Closes #33366 

### Reason for this change

Field Indexing for CloudWatch Logs (CWL) was launched in Nov 2024. A lot of CWL customers are asking for indexing support in L2 construct. This feature will enable that property under FieldIndexPolicies as a JSON object in the LogGroup construct.

### Description of changes

The change here is just populating the `fieldIndexPolicies` property of the LogGroup CFN with the list of fields provided by the user. The format of this property will be like this:

```
const fieldIndexPolicy = new FieldIndexPolicy({
  fields: ['Operation', 'RequestId'],
});

new LogGroup(this, 'LogGroupLambda', {
  dataProtectionPolicy: dataProtectionPolicy,
  fieldIndexPolicies: [fieldIndexPolicy],
});
```

### Describe any new or updated permissions being added

No new permissions have been added.


### Description of how you validated changes

Added unit tests. Will add integ tests after getting a confirmation from the CDK team on the implementation.

### Checklist
- [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

github-actions bot commented Mar 5, 2025

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 Mar 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-logs Related to Amazon CloudWatch Logs effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. open-for-community-contribution We are welcoming community contributions for this one p3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants