Skip to main content

auto_scaling_configurations

Creates, updates, deletes, gets or lists an auto_scaling_configurations resource.

Overview

Nameauto_scaling_configurations
TypeResource
Idaws.apprunner.auto_scaling_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
auto_scaling_configuration_arnstringThe Amazon Resource Name (ARN) of this auto scaling configuration. (pattern: <code>arn:aws(-[\w]+)*:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[0-9]{12}:(\w|/|-){1,1011}</code>)
auto_scaling_configuration_namestringThe customer-provided auto scaling configuration name. It can be used in multiple revisions of a configuration. (pattern: <code>[A-Za-z0-9][A-Za-z0-9-_]{3,31}</code>)
auto_scaling_configuration_revisionintegerThe revision of this auto scaling configuration. It's unique among all the active configurations ("Status": "ACTIVE") that share the same AutoScalingConfigurationName.
created_atstring (date-time)The time when the auto scaling configuration was created. It's in Unix time stamp format.
deleted_atstring (date-time)The time when the auto scaling configuration was deleted. It's in Unix time stamp format.
has_associated_servicebooleanIndicates if this auto scaling configuration has an App Runner service associated with it. A value of true indicates one or more services are associated. A value of false indicates no services are associated.
is_defaultbooleanIndicates if this auto scaling configuration should be used as the default for a new App Runner service that does not have an auto scaling configuration ARN specified during creation. Each account can have only one default AutoScalingConfiguration per region. The default AutoScalingConfiguration can be any revision under the same AutoScalingConfigurationName.
latestbooleanIt's set to true for the configuration with the highest Revision among all configurations that share the same AutoScalingConfigurationName. It's set to false otherwise.
max_concurrencyintegerThe maximum number of concurrent requests that an instance processes. If the number of concurrent requests exceeds this limit, App Runner scales the service up.
max_sizeintegerThe maximum number of instances that a service scales up to. At most MaxSize instances actively serve traffic for your service.
min_sizeintegerThe minimum number of instances that App Runner provisions for a service. The service always has at least MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset. App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the same capacity for both old and new code.
statusstringThe current state of the auto scaling configuration. If the status of a configuration revision is INACTIVE, it was deleted and can't be used. Inactive configuration revisions are permanently removed some time after they are deleted. (ACTIVE, INACTIVE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_auto_scaling_configurationselectregionReturn a full description of an App Runner automatic scaling configuration resource.
list_auto_scaling_configurationsselectregionReturns a list of active App Runner automatic scaling configurations in your Amazon Web Services account. You can query the revisions for a specific configuration name or the revisions for all active configurations in your account. You can optionally query only the latest revision of each requested name. To retrieve a full description of a particular configuration revision, call and provide one of the ARNs returned by ListAutoScalingConfigurations.
create_auto_scaling_configurationinsertregion, AutoScalingConfigurationNameCreate an App Runner automatic scaling configuration resource. App Runner requires this resource when you create or update App Runner services and you require non-default auto scaling settings. You can share an auto scaling configuration across multiple services. Create multiple revisions of a configuration by calling this action multiple times using the same AutoScalingConfigurationName. The call returns incremental AutoScalingConfigurationRevision values. When you create a service and configure an auto scaling configuration resource, the service uses the latest active revision of the auto scaling configuration by default. You can optionally configure the service to use a specific revision. Configure a higher MinSize to increase the spread of your App Runner service over more Availability Zones in the Amazon Web Services Region. The tradeoff is a higher minimal cost. Configure a lower MaxSize to control your cost. The tradeoff is lower responsiveness during peak demand.
update_default_auto_scaling_configurationupdateregion, AutoScalingConfigurationArnUpdate an auto scaling configuration to be the default. The existing default auto scaling configuration will be set to non-default automatically.
delete_auto_scaling_configurationdeleteregionDelete an App Runner automatic scaling configuration resource. You can delete a top level auto scaling configuration, a specific revision of one, or all revisions associated with the top level configuration. You can't delete the default auto scaling configuration or a configuration that's used by one or more App Runner services.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Return a full description of an App Runner automatic scaling configuration resource.

SELECT
auto_scaling_configuration_arn,
auto_scaling_configuration_name,
auto_scaling_configuration_revision,
created_at,
deleted_at,
has_associated_service,
is_default,
latest,
max_concurrency,
max_size,
min_size,
status
FROM aws.apprunner.auto_scaling_configurations
WHERE region = '{{ region }}' -- required
;

INSERT examples

Create an App Runner automatic scaling configuration resource. App Runner requires this resource when you create or update App Runner services and you require non-default auto scaling settings. You can share an auto scaling configuration across multiple services. Create multiple revisions of a configuration by calling this action multiple times using the same AutoScalingConfigurationName. The call returns incremental AutoScalingConfigurationRevision values. When you create a service and configure an auto scaling configuration resource, the service uses the latest active revision of the auto scaling configuration by default. You can optionally configure the service to use a specific revision. Configure a higher MinSize to increase the spread of your App Runner service over more Availability Zones in the Amazon Web Services Region. The tradeoff is a higher minimal cost. Configure a lower MaxSize to control your cost. The tradeoff is lower responsiveness during peak demand.

INSERT INTO aws.apprunner.auto_scaling_configurations (
AutoScalingConfigurationName,
MaxConcurrency,
MinSize,
MaxSize,
Tags,
region
)
SELECT
'{{ AutoScalingConfigurationName }}' /* required */,
{{ MaxConcurrency }},
{{ MinSize }},
{{ MaxSize }},
'{{ Tags }}',
'{{ region }}'
RETURNING
auto_scaling_configuration
;

UPDATE examples

Update an auto scaling configuration to be the default. The existing default auto scaling configuration will be set to non-default automatically.

UPDATE aws.apprunner.auto_scaling_configurations
SET
AutoScalingConfigurationArn = '{{ AutoScalingConfigurationArn }}'
WHERE
region = '{{ region }}' --required
AND AutoScalingConfigurationArn = '{{ AutoScalingConfigurationArn }}' --required
RETURNING
auto_scaling_configuration;

DELETE examples

Delete an App Runner automatic scaling configuration resource. You can delete a top level auto scaling configuration, a specific revision of one, or all revisions associated with the top level configuration. You can't delete the default auto scaling configuration or a configuration that's used by one or more App Runner services.

DELETE FROM aws.apprunner.auto_scaling_configurations
WHERE region = '{{ region }}' --required
;