Registry /
aws / aws-solutions-constructs-core
Install & Compatibility
Where this runs
tested against v2.102.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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 359.3MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 17.7s · import 0.000s · 360MB
397MB installed
● package 397MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SolutionConstruct
✓ from aws_solutions_constructs.core import SolutionConstruct
✗ from aws_solutions_constructs import SolutionConstruct
This quickstart demonstrates using `aws-solutions-constructs-core.add_tags` to apply standardized tags to a simple AWS Lambda function within an AWS CDK stack. This highlights how core utilities can be directly leveraged alongside standard CDK resources.
import os
from aws_cdk import (
App,
Stack,
aws_lambda as _lambda,
)
from constructs import Construct
from aws_solutions_constructs.aws_solutions_constructs_core import add_tags
class MyCoreUsageStack(Stack):
def __init__(self, scope: Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
# Create a basic Lambda function
my_function = _lambda.Function(
self, "MyFunction",
runtime=_lambda.Runtime.PYTHON_3_9,
handler="index.handler",
code=_lambda.Code.from_inline("def handler(event, context): return 'Hello from Lambda!'")
)
# Use a utility from aws_solutions_constructs_core to add tags to the Lambda
# add_tags is often used implicitly by pattern constructs, but can be used directly.
add_tags(my_function, {
"Project": "MyCDKApp",
"Environment": "Development"
})
app = App()
MyCoreUsageStack(app, "MyCoreUsageStack", env={
'account': os.environ.get('CDK_DEFAULT_ACCOUNT', ''),
'region': os.environ.get('CDK_DEFAULT_REGION', 'us-east-1')
})
app.synth()
Debug
Known issues
breakingAWS Solutions Constructs are tightly coupled to specific versions of `aws-cdk-lib`. Mismatched versions can lead to runtime errors, API inconsistencies, or unexpected behavior.fixAlways align your `aws-cdk-lib` version with the `aws-solutions-constructs-core` version (e.g., if constructs is `2.x.y`, install `aws-cdk-lib==2.x.y` or within its specified compatible range). Check the `pyproject.toml` or `setup.py` for exact dependencies.
affects: All versions, especially across major/minor CDK updates.
gotchaThe `aws-solutions-constructs-core` library provides base classes and helper functions. It is not designed to be instantiated directly for full patterns. Instead, it's used to extend or assist with other `aws-solutions-constructs.*` pattern libraries.fixIf you are looking for pre-built, high-level patterns (e.g., API Gateway to Lambda), use specific pattern libraries like `aws-solutions-constructs.aws_apigateway_lambda`. `core` is for building *your own* constructs or using specific helper methods.
affects: All versions
gotchaSolutions Constructs abstracts away many underlying L1/L2 details for simplicity. If you need fine-grained control or access to low-level CloudFormation properties, you might need to use `.node.default_child` or similar, which can bypass the construct's intended abstraction and lead to future compatibility issues.fixPrefer using the construct's provided properties and methods for configuration. If direct L1/L2 access is critical, carefully review the construct's documentation and consider the implications for future upgrades.
affects: All versions
Upgrade
Version history
2.102.0latest on PyPI · released May 15, 2026
Audit
Dependencies
aws-cdk-librequiredThis library is built on top of the AWS CDK and requires a compatible version of `aws-cdk-lib` to function correctly. Version alignment is critical.
constructsrequiredProvides the base Construct class used by CDK and all L3 constructs, typically installed as a dependency of `aws-cdk-lib`.