{"id":8853,"library":"aws-cdk-aws-autoscaling-common","title":"AWS CDK Auto Scaling Common Library","description":"The `aws-cdk-aws-autoscaling-common` package provides shared implementation details for the AWS Cloud Development Kit's `@aws-cdk/aws-autoscaling` and `@aws-cdk/aws-applicationautoscaling` libraries. It is an internal dependency and is not intended for direct use by CDK users. As of version 1.204.0, this package is part of AWS CDK v1, which has reached End-of-Support. Users are encouraged to migrate to AWS CDK v2 and utilize `aws-cdk-lib.aws_autoscaling` and `aws-cdk-lib.aws_applicationautoscaling` directly.","status":"maintenance","version":"1.204.0","language":"en","source_language":"en","source_url":"https://github.com/aws/aws-cdk.git","tags":["aws-cdk","autoscaling","aws","cloud-development-kit","infrastructure-as-code","internal-library","aws-ec2","aws-application-autoscaling"],"install":[{"cmd":"pip install aws-cdk.aws-autoscaling-common==1.204.0","lang":"bash","label":"Install specific AWS CDK v1 version"},{"cmd":"pip install aws-cdk-lib","lang":"bash","label":"Recommended: Install AWS CDK v2 (indirectly includes functionality)"}],"dependencies":[{"reason":"Core dependency for AWS CDK constructs. Version conflicts are common when mixing CDK v1 and v2 or specific module versions.","package":"constructs","optional":false}],"imports":[{"note":"`aws-cdk-aws-autoscaling-common` is an internal package and should not be directly imported. Auto Scaling Group constructs are exposed via `aws_cdk.aws_autoscaling` in CDK v1 and `aws_cdk.aws_autoscaling` within `aws-cdk-lib` in CDK v2.","symbol":"AutoScalingGroup","correct":"from aws_cdk import aws_autoscaling as autoscaling\n# ...\nautoscaling.AutoScalingGroup"}],"quickstart":{"code":"import os\nfrom aws_cdk import (\n    App,\n    Stack,\n    aws_ec2 as ec2,\n    aws_autoscaling as autoscaling,\n    Duration\n)\n\nclass AutoScalingStack(Stack):\n    def __init__(self, scope: App, id: str, **kwargs) -> None:\n        super().__init__(scope, id, **kwargs)\n\n        vpc = ec2.Vpc(self, \"MyVpc\", max_azs=2)\n\n        asg = autoscaling.AutoScalingGroup(self, \"MyASG\",\n            vpc=vpc,\n            instance_type=ec2.InstanceType.of(\n                ec2.InstanceClass.BURSTABLE2,\n                ec2.InstanceSize.MICRO\n            ),\n            machine_image=ec2.MachineImage.latest_amazon_linux2(),\n            min_capacity=1,\n            max_capacity=3\n        )\n\n        asg.scale_on_cpu_utilization(\"CpuScaling\",\n            target_utilization_percent=50,\n            cooldown=Duration.minutes(5)\n        )\n\napp = App()\nAutoScalingStack(app, \"AutoScalingExampleStack\")\napp.synth()","lang":"python","description":"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."},"warnings":[{"fix":"Migrate 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`.","message":"`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.","severity":"breaking","affected_versions":"1.x.x (all versions)"},{"fix":"Always 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.","message":"Do 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.","severity":"gotcha","affected_versions":"1.x.x (all versions)"},{"fix":"Transition 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.","message":"AWS 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.","severity":"deprecated","affected_versions":"1.x.x (all versions)"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure you are working in a clean Python virtual environment. Install either only AWS CDK v2 (`pip install aws-cdk-lib`) or only AWS CDK v1 components (e.g., `pip install aws-cdk.aws-autoscaling-common==1.204.0`), but do not mix them. The recommended approach is to migrate entirely to AWS CDK v2.","cause":"This error typically occurs when trying to install `aws-cdk-lib` (CDK v2) alongside older CDK v1 packages like `aws-cdk-aws-autoscaling-common` or other `aws-cdk.aws-*` modules, which require an older `constructs` version (e.g., `<4.0.0`), while `aws-cdk-lib` requires a newer one (e.g., `>=10.0.0`).","error":"ERROR: Cannot install aws-cdk-lib==2.x.y and constructs<4.0.0 and >=3.3.69 because these package versions have conflicting dependencies."},{"fix":"Instead of importing `aws_cdk.aws_autoscaling_common`, import `aws_cdk.aws_autoscaling` or `aws_cdk.aws_applicationautoscaling` from `aws-cdk-lib` (for CDK v2) or directly from the respective v1 packages if you are intentionally using v1. All user-facing autoscaling constructs are available there.","cause":"You are attempting to directly import `aws_cdk.aws_autoscaling_common`. This package is not designed for direct user interaction and its components are typically exposed through higher-level `aws_cdk.aws_autoscaling` or `aws_cdk.aws_applicationautoscaling` modules. This error might occur if you are expecting it to behave like a standalone construct library in CDK v2.","error":"ModuleNotFoundError: No module named 'aws_cdk.aws_autoscaling_common'"}]}