Skip to content

feat(lambda): add logGroup and systemLogLevel to CapacityProvider - #38183

Merged
mergify[bot] merged 8 commits into
aws:mainfrom
vicheey:feat/capacity-provider-telemetry-config
Jul 22, 2026
Merged

feat(lambda): add logGroup and systemLogLevel to CapacityProvider#38183
mergify[bot] merged 8 commits into
aws:mainfrom
vicheey:feat/capacity-provider-telemetry-config

Conversation

@vicheey

@vicheey vicheey commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Issue # (if applicable)

Closes #38182.

Reason for this change

Lambda CapacityProvider now supports TelemetryConfig in CloudFormation, enabling customers to configure system logging for scaling activity. The L1 CfnCapacityProvider already has telemetryConfig, but there is no L2 support.

Description of changes

Added logGroup and systemLogLevel props to CapacityProviderProps, matching how the Function L2 exposes logging as flat props rather than a nested interface.

  • logGroup?: logs.ILogGroup — CloudWatch log group for system logs
  • systemLogLevel?: SystemLogLevel — log verbosity (DEBUG, INFO, WARN)

The construct conditionally renders telemetryConfig.loggingConfig on the L1 resource only when at least one prop is specified. When neither is provided, TelemetryConfig is absent from the CFN output (service applies defaults).

Reuses the existing SystemLogLevel enum from the Function construct.

Describe any new or updated permissions being added

No new permissions. Log delivery permissions are already included in the AWSLambdaManagedEC2ResourceOperator managed policy that the operator role uses.

Description of how you validated changes

  • 4 new unit tests (systemLogLevel only, logGroup only, both, absent)
  • All 37 capacity-provider unit tests pass
  • ESLint clean, TypeScript compiles without errors
  • Integration test updated (integ.capacity-provider-all-fields) with systemLogLevel: DEBUG
  • Integ snapshot regenerated and committed
  • README updated with props table entry and usage example

Checklist


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

Adds TelemetryConfig support to the CapacityProvider L2 construct.
Customers can specify a log group and system log level for scaling
activity logs. The construct wraps these into the CFN
TelemetryConfig.LoggingConfig property.
@github-actions github-actions Bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels Jun 19, 2026

@abidhasan-aws abidhasan-aws left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vicheey,
Thanks for the PR :)

Left a tiny comment!

@mergify
mergify Bot dismissed abidhasan-aws’s stale review July 14, 2026 15:44

Pull request has been modified.

@aws-cdk-automation

Copy link
Copy Markdown
Collaborator

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing

To prevent automatic closure:

  • Resume work on the PR
  • OR request an exemption by adding a comment containing 'Exemption Request' with justification e.x "Exemption Request: "
  • OR request clarification by adding a comment containing 'Clarification Request' with a question e.x "Clarification Request: "

This PR will automatically close in 14 days if no action is taken.

Comment thread packages/aws-cdk-lib/aws-lambda/lib/capacity-provider.ts Outdated
Comment thread packages/aws-cdk-lib/aws-lambda/README.md
- Migrate logGroup prop from ILogGroup to ILogGroupRef (awslint prefer-ref-interface)
- Access log group name via logGroupRef.logGroupName
- Add logGroup to integration test for deployment verification
- Add logGroup to README CapacityProvider example and props table
- Regenerate integ test snapshots
@vicheey
vicheey requested a review from abidhasan-aws July 21, 2026 18:35
@abidhasan-aws abidhasan-aws added the pr/needs-integration-tests-deployment Requires the PR to deploy the integration test snapshots. label Jul 22, 2026
@abidhasan-aws
abidhasan-aws temporarily deployed to deployment-integ-test July 22, 2026 13:30 — with GitHub Actions Inactive
@mergify

mergify Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify

mergify Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-22 14:56 UTC · Rule: default-squash · triggered by rule automatic merge
  • Checks skipped · PR is already up-to-date
  • Merged2026-07-22 14:56 UTC · at 3df31bb455e3bee35255693eea3e05071ffaa17d · squash

This pull request spent 17 seconds in the queue, including 3 seconds running CI.

Required conditions to merge

@mergify
mergify Bot merged commit 61a2e2d into aws:main Jul 22, 2026
32 of 33 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

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 22, 2026
@vicheey
vicheey deleted the feat/capacity-provider-telemetry-config branch August 10, 2026 21:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/needs-integration-tests-deployment Requires the PR to deploy the integration test snapshots.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(lambda): add TelemetryConfig (system logging) support to CapacityProvider L2 construct

5 participants