feat(lambda): add logGroup and systemLogLevel to CapacityProvider - #38183
Conversation
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.
abidhasan-aws
left a comment
There was a problem hiding this comment.
Hi @vicheey,
Thanks for the PR :)
Left a tiny comment!
Pull request has been modified.
|
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:
This PR will automatically close in 14 days if no action is taken. |
- 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
|
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). |
Merge Queue Status
This pull request spent 17 seconds in the queue, including 3 seconds running CI. Required conditions to merge
|
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #38182.
Reason for this change
Lambda CapacityProvider now supports
TelemetryConfigin CloudFormation, enabling customers to configure system logging for scaling activity. The L1CfnCapacityProvideralready hastelemetryConfig, but there is no L2 support.Description of changes
Added
logGroupandsystemLogLevelprops toCapacityProviderProps, matching how the Function L2 exposes logging as flat props rather than a nested interface.logGroup?: logs.ILogGroup— CloudWatch log group for system logssystemLogLevel?: SystemLogLevel— log verbosity (DEBUG, INFO, WARN)The construct conditionally renders
telemetryConfig.loggingConfigon the L1 resource only when at least one prop is specified. When neither is provided,TelemetryConfigis absent from the CFN output (service applies defaults).Reuses the existing
SystemLogLevelenum from the Function construct.Describe any new or updated permissions being added
No new permissions. Log delivery permissions are already included in the
AWSLambdaManagedEC2ResourceOperatormanaged policy that the operator role uses.Description of how you validated changes
integ.capacity-provider-all-fields) withsystemLogLevel: DEBUGChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license