Registry /
aws / aws-cdk-aws-autoscaling-common
Install & Compatibility
Where this runs
tested against v1.204.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.940 runs
installs and imports cleanly · install 0.0s · import 0.000s · 480MB
glibcpy 3.10–3.940 runs
installs and imports cleanly · install 10.5s · import 0.000s · 551MB
555MB installed
● package 555MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
aws_autoscaling
✓ import aws_cdk.aws_autoscaling as autoscaling
✗ from aws_cdk import aws_autoscaling as autoscaling
This quickstart demonstrates how to create an EC2 Auto Scaling Group using `aws-cdk-lib.aws_autoscaling` (or the equivalent `aws_cdk.aws_autoscaling` if using CDK v1). This is the recommended way to provision auto-scaling resources. The `aws-cdk-aws-autoscaling-common` package is an underlying dependency and not directly used in user code.
import os
from aws_cdk import (
App,
Stack,
aws_ec2 as ec2,
aws_autoscaling as autoscaling,
Duration
)
class AutoScalingStack(Stack):
def __init__(self, scope: App, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
vpc = ec2.Vpc(self, "MyVpc", max_azs=2)
asg = autoscaling.AutoScalingGroup(self, "MyASG",
vpc=vpc,
instance_type=ec2.InstanceType.of(
ec2.InstanceClass.BURSTABLE2,
ec2.InstanceSize.MICRO
),
machine_image=ec2.MachineImage.latest_amazon_linux2(),
min_capacity=1,
max_capacity=3
)
asg.scale_on_cpu_utilization("CpuScaling",
target_utilization_percent=50,
cooldown=Duration.minutes(5)
)
app = App()
AutoScalingStack(app, "AutoScalingExampleStack")
app.synth()
Debug
Known issues
breaking`aws-cdk-aws-autoscaling-common` is a v1 package and has reached End-of-Support. Continued use of AWS CDK v1 constructs with AWS CDK v2 libraries (like `aws-cdk-lib`) can lead to dependency conflicts, particularly with the `constructs` library.fixMigrate your CDK project to AWS CDK v2 (`aws-cdk-lib`). This involves updating your `requirements.txt` to `aws-cdk-lib` and updating your code to use the `aws_cdk.aws_autoscaling` module within `aws-cdk-lib`.
affects: 1.x.x (all versions)
gotchaDo not attempt to directly import or use constructs from `aws-cdk-aws-autoscaling-common`. It is an internal implementation detail and not part of the public API for users.fixAlways use the higher-level constructs provided by `aws-cdk-lib.aws_autoscaling` (for EC2 Auto Scaling) or `aws-cdk-lib.aws_applicationautoscaling` (for Application Auto Scaling) in CDK v2. If using CDK v1, use `aws_cdk.aws_autoscaling` or `aws_cdk.aws_applicationautoscaling` directly.
affects: 1.x.x (all versions)
deprecatedAWS CDK v1, including `aws-cdk-aws-autoscaling-common`, reached End-of-Support on 2023-06-01. While the package might still be installable, it no longer receives updates, security patches, or new features.fixTransition your projects to AWS CDK v2 (`aws-cdk-lib`) to benefit from active development, support, and the latest features. Refer to the 'Migrating to AWS CDK v2' guide.
affects: 1.x.x (all versions)
Upgrade
Version history
1.204.0latest on PyPI · released Jun 19, 2023
Audit
Dependencies
constructsrequiredCore dependency for AWS CDK constructs. Version conflicts are common when mixing CDK v1 and v2 or specific module versions.