auto_scaling_configurations
Creates, updates, deletes, gets or lists an auto_scaling_configurations resource.
Overview
| Name | auto_scaling_configurations |
| Type | Resource |
| Id | aws.apprunner.auto_scaling_configurations |
Fields
The following fields are returned by SELECT queries:
- describe_auto_scaling_configuration
- list_auto_scaling_configurations
| Name | Datatype | Description |
|---|---|---|
auto_scaling_configuration_arn | string | The 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_name | string | The 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_revision | integer | The revision of this auto scaling configuration. It's unique among all the active configurations ("Status": "ACTIVE") that share the same AutoScalingConfigurationName. |
created_at | string (date-time) | The time when the auto scaling configuration was created. It's in Unix time stamp format. |
deleted_at | string (date-time) | The time when the auto scaling configuration was deleted. It's in Unix time stamp format. |
has_associated_service | boolean | Indicates 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_default | boolean | Indicates 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. |
latest | boolean | It'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_concurrency | integer | 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. |
max_size | integer | The maximum number of instances that a service scales up to. At most MaxSize instances actively serve traffic for your service. |
min_size | integer | The 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. |
status | string | The 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) |
| Name | Datatype | Description |
|---|---|---|
auto_scaling_configuration_summary_list | array | A list of summary information records for auto scaling configurations. In a paginated request, the request returns up to MaxResults records for each call. |
next_token | string | The token that you can pass in a subsequent request to get the next result page. It's returned in a paginated request. (pattern: <code>.*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_auto_scaling_configuration | select | region | Return a full description of an App Runner automatic scaling configuration resource. | |
list_auto_scaling_configurations | select | region | Returns 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_configuration | insert | region, AutoScalingConfigurationName | 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. | |
update_default_auto_scaling_configuration | update | region, AutoScalingConfigurationArn | Update an auto scaling configuration to be the default. The existing default auto scaling configuration will be set to non-default automatically. | |
delete_auto_scaling_configuration | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_auto_scaling_configuration
- list_auto_scaling_configurations
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
;
Returns 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.
SELECT
auto_scaling_configuration_summary_list,
next_token
FROM aws.apprunner.auto_scaling_configurations
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_auto_scaling_configuration
- Manifest
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
;
# Description fields are for documentation purposes
- name: auto_scaling_configurations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the auto_scaling_configurations resource.
- name: AutoScalingConfigurationName
value: "{{ AutoScalingConfigurationName }}"
description: |
A name for the auto scaling configuration. When you use it for the first time in an Amazon Web Services Region, App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration. Prior to the release of Auto scale configuration enhancements, the name DefaultConfiguration was reserved. This restriction is no longer in place. You can now manage DefaultConfiguration the same way you manage your custom auto scaling configurations. This means you can do the following with the DefaultConfiguration that App Runner provides: Create new revisions of the DefaultConfiguration. Delete the revisions of the DefaultConfiguration. Delete the auto scaling configuration for which the App Runner DefaultConfiguration was created. If you delete the auto scaling configuration you can create another custom auto scaling configuration with the same DefaultConfiguration name. The original DefaultConfiguration resource provided by App Runner remains in your account unless you make changes to it.
- name: MaxConcurrency
value: {{ MaxConcurrency }}
description: |
The maximum number of concurrent requests that you want an instance to process. If the number of concurrent requests exceeds this limit, App Runner scales up your service. Default: 100
- name: MinSize
value: {{ MinSize }}
description: |
The minimum number of instances that App Runner provisions for your 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. Default: 1
- name: MaxSize
value: {{ MaxSize }}
description: |
The maximum number of instances that your service scales up to. At most MaxSize instances actively serve traffic for your service. Default: 25
- name: Tags
description: |
A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_default_auto_scaling_configuration
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_auto_scaling_configuration
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
;