The aws documentation for configuring provisioned concurrency states (emphasis mine):
Both of the Application Auto Scaling alarms use the average statistic by default. Functions that experience quick bursts of traffic may not trigger these alarms. For example, suppose your Lambda function executes quickly (i.e. 20-100 ms) and your traffic comes in quick bursts. In this case, the number of requests exceeds the allocated provisioned concurrency during the burst. However, Application Auto Scaling requires the burst load to sustain for at least 3 minutes in order to provision additional environments. Additionally, both CloudWatch alarms require 3 data points that hit the target average to activate the auto scaling policy. If your function experiences quick bursts of traffic, using the Maximum statistic instead of the Average statistic can be more effective at scaling provisioned concurrency to minimize cold starts.
How can the “Average” statistic be changed to the “Maximum” statistic using CDK?
Neither the Builder for UtilizationScalingOptions nor the Builder for AutoScalingOptions has a way to change the “average” function.
Thank you in advance for your consideration and response.