interface AutoScalingConfigurationProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppRunner.Alpha.AutoScalingConfigurationProps |
Go | github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2#AutoScalingConfigurationProps |
Java | software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfigurationProps |
Python | aws_cdk.aws_apprunner_alpha.AutoScalingConfigurationProps |
TypeScript (source) | @aws-cdk/aws-apprunner-alpha ยป AutoScalingConfigurationProps |
Properties of the App Runner Auto Scaling Configuration.
Example
const autoScalingConfiguration = new apprunner.AutoScalingConfiguration(this, 'AutoScalingConfiguration', {
autoScalingConfigurationName: 'MyAutoScalingConfiguration',
maxConcurrency: 150,
maxSize: 20,
minSize: 5,
});
new apprunner.Service(this, 'DemoService', {
source: apprunner.Source.fromEcrPublic({
imageConfiguration: { port: 8000 },
imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
}),
autoScalingConfiguration,
});
Properties
Name | Type | Description |
---|---|---|
auto | string | The name for the Auto Scaling Configuration. |
max | number | The maximum number of concurrent requests that an instance processes. |
max | number | The maximum number of instances that a service scales up to. |
min | number | The minimum number of instances that App Runner provisions for a service. |
autoScalingConfigurationName?
Type:
string
(optional, default: a name generated by CloudFormation)
The name for the Auto Scaling Configuration.
maxConcurrency?
Type:
number
(optional, default: 100)
The maximum number of concurrent requests that an instance processes.
If the number of concurrent requests exceeds this limit, App Runner scales the service up.
Must be between 1 and 200.
maxSize?
Type:
number
(optional, default: 25)
The maximum number of instances that a service scales up to.
At most maxSize instances actively serve traffic for your service.
Must be between 1 and 25.
minSize?
Type:
number
(optional, default: 1)
The minimum number of instances that App Runner provisions for a service.
The service always has at least minSize provisioned instances.
Must be between 1 and 25.