{"id":26824,"library":"cdk-common","title":"cdk-common","description":"Common AWS CDK library providing reusable constructs and utilities for AWS CDK applications. Version 2.1.27, supporting Python ~=3.9. Active development with weekly releases.","status":"active","version":"2.1.27","language":"python","source_language":"en","source_url":"https://github.com/neilkuan/cdk-common","tags":["aws-cdk","cdk","infrastructure-as-code","constructs","cloudformation"],"install":[{"cmd":"pip install cdk-common","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Peer dependency for CDK constructs","package":"aws-cdk-lib","optional":false},{"reason":"Base class for CDK constructs","package":"constructs","optional":false}],"imports":[{"note":"Incorrect submodule path","wrong":"from cdk_common.base import BaseConstruct","symbol":"BaseConstruct","correct":"from cdk_common import BaseConstruct"},{"note":"Top-level import is correct","wrong":"from cdk_common.lambda_function import LambdaFunction","symbol":"LambdaFunction","correct":"from cdk_common import LambdaFunction"}],"quickstart":{"code":"from aws_cdk import App, Stack\nfrom cdk_common import BaseConstruct\n\nclass MyStack(Stack):\n    def __init__(self, scope, id, **kwargs):\n        super().__init__(scope, id, **kwargs)\n        BaseConstruct(self, \"MyConstruct\")\n\napp = App()\nMyStack(app, \"MyStack\")\napp.synth()","lang":"python","description":"Minimal CDK app using cdk-common's BaseConstruct."},"warnings":[{"fix":"Replace all @aws-cdk/* imports with aws_cdk.* equivalents.","message":"Version 2.x migrated from aws-cdk-lib v1 to v2. All imports must use aws_cdk (v2) not @aws-cdk/*.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'from cdk_common import LambdaFunction' instead.","message":"The function 'create_lambda_function' was replaced by 'LambdaFunction' class in v1.5.0.","severity":"deprecated","affected_versions":">=1.5.0"},{"fix":"Always use unique construct IDs, e.g., via 'self.id' or a counter.","message":"Construct IDs must be unique within the same scope; reusing IDs causes synthesis failure.","severity":"gotcha","affected_versions":"all"},{"fix":"Refer to the official documentation for the required parameters of each construct.","message":"Not all constructs accept 'kwargs' for all properties; check the specific construct's signature.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install cdk-common' and import using 'import cdk_common'.","cause":"The package 'cdk-common' installs with hyphens but the Python import uses underscores.","error":"ModuleNotFoundError: No module named 'cdk_common'"},{"fix":"Update to latest version (2.1.27) and use 'from cdk_common import BaseConstruct'.","cause":"The symbol is not exported from the package's __init__.py; it may be in a submodule.","error":"AttributeError: module 'cdk_common' has no attribute 'BaseConstruct'"},{"fix":"Use unique IDs for each construct, e.g., by appending a suffix.","cause":"Duplicate construct ID within the same scope.","error":"jsii.errors.JSIIError: There is already a resource with name 'MyConstruct' in scope 'MyStack'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}