Registry / aws / aws-cdk-cloud-assembly-schema

aws-cdk-cloud-assembly-schema

JSON →
library54.21.0pypypi✓ verified 24d ago

The `aws-cdk-cloud-assembly-schema` Python library defines the schema for the Cloud Assembly, which is the output of the AWS CDK's synthesis operation (e.g., `cdk synth`). This schema, primarily found in `manifest.json`, acts as the communication protocol between the AWS CDK framework (libraries) and the AWS CDK CLI (tools), providing instructions for deploying infrastructure. The library is actively maintained with frequent updates, usually in sync with the broader AWS CDK CLI project, currently at version 53.14.0.

pip install aws-cdk-cloud-assembly-schema
INSTALL
IMPORT
SIG · AWS-CDK-CLOUD-ASSE
A
aws-cdk-cloud-assembly-schema
awspythonv54.21.0
Install
2.4s avg
Import
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v54.21.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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 24.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 25MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AssetManifest
from aws_cdk.cloud_assembly_schema import AssetManifest
Direct imports from this library are uncommon for typical CDK application development, as it primarily defines a protocol schema. It's mostly used internally by the CDK framework and CLI, or for advanced programmatic manipulation/validation of cloud assembly artifacts.

This quickstart demonstrates a basic AWS CDK application that creates an S3 bucket. While `aws-cdk-cloud-assembly-schema` is not directly imported here, running `cdk synth` on this application will produce a Cloud Assembly (including `manifest.json`) that conforms to the schema defined by this library. This illustrates the library's role as an underlying protocol definition rather than a direct development dependency for resource creation.

import os import aws_cdk as cdk import aws_cdk.aws_s3 as s3 from constructs import Construct class MyCdkStack(cdk.Stack): def __init__(self, scope: Construct, id: str, **kwargs) -> None: super().__init__(scope, id, **kwargs) # Create an S3 bucket s3.Bucket(self, "MyBucket", versioned=True, removal_policy=cdk.RemovalPolicy.DESTROY, auto_delete_objects=True ) app = cdk.App() MyCdkStack(app, "MyFirstCdkStack", env=cdk.Environment( account=os.environ.get("CDK_DEFAULT_ACCOUNT", ""), region=os.environ.get("CDK_DEFAULT_REGION", "eu-west-1") ) ) app.synth()
cdk --version
Debug
Known issues
breakingCloud Assembly Schema Version Mismatch: A common breaking error occurs when the AWS CDK CLI version is incompatible with the `aws-cdk-lib` version used by your application, leading to a 'Cloud assembly schema version mismatch' error. This happens because the schema version is strictly tied to the CDK libraries.
fix
Always upgrade your AWS CDK CLI (globally installed `cdk` command) to the latest version to ensure compatibility with your `aws-cdk-lib` version. This is the recommended solution over downgrading libraries. Use `npm update -g aws-cdk` or `pip install --upgrade aws-cdk` (if using pip for CLI).
affects: All versions
gotchaIntended Use as Internal Protocol: This library primarily defines the internal communication protocol (the Cloud Assembly manifest) between the AWS CDK framework and the AWS CDK CLI. It is generally not intended for direct use by end-developers building AWS CDK applications to define infrastructure, unlike `aws-cdk-lib`.
fix
For defining AWS infrastructure programmatically, use `aws-cdk-lib` which provides higher-level constructs and a more application-centric API. Reserve direct interaction with `aws-cdk-cloud-assembly-schema` for advanced scenarios like building custom CDK tooling or validating generated Cloud Assemblies.
affects: All versions
gotchaStrict Major Versioning Policy: The `aws-cdk-cloud-assembly-schema` follows semantic versioning with a critical nuance: *any* change to the schema, even if it doesn't strictly break JSON schema validation, results in a major version bump. This is because every instruction in the manifest is crucial for correct deployment behavior.
fix
When building tools that consume cloud assemblies, always consider the major version of the schema. Consumers should reject cloud assemblies with a major version higher than what they explicitly support to guarantee deployment integrity, even if schema validation appears to pass.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aws_cdk.cloud_assembly_schema'
The 'aws_cdk.cloud_assembly_schema' module is not installed in the Python environment.
fix
Install the module using pip: 'pip install aws-cdk.cloud-assembly-schema'.
Error: Cannot find module '@aws-cdk/cloud-assembly-schema'
The '@aws-cdk/cloud-assembly-schema' package is missing from the Node.js project dependencies.
fix
Add the package to your project by running: 'npm install @aws-cdk/cloud-assembly-schema'.
Cloud assembly schema version mismatch: Maximum schema version supported is 21.0.0, but found 22.0.0
The AWS CDK CLI version is outdated and does not support the schema version used by the application.
fix
Update the AWS CDK CLI to the latest version by running: 'npm install -g aws-cdk'.
Cloud assembly schema version mismatch: Maximum schema version supported is X.Y.Z, but found A.B.C
The AWS CDK CLI (Toolkit) version you are using is not compatible with the `aws-cdk-lib` (Construct Library) version in your application's dependencies, preventing the CLI from correctly interpreting the generated `manifest.json` schema.
fix
Upgrade your AWS CDK CLI to the latest version (`npm install -g aws-cdk@latest` for JavaScript/TypeScript, or update your `aws-cdk` package in Python) to ensure it supports the schema version output by your application.
Error: Invalid assembly manifest: instance.artifacts.X.type is not one of enum values: Y, Z, ...
The `manifest.json` file generated by the CDK application does not conform to the expected Cloud Assembly schema, often due to an incompatible library version, incorrect construct usage, or a bug in the CDK library.
fix
Ensure all your AWS CDK related packages (`aws-cdk-lib`, `constructs`, etc.) are updated to compatible versions, especially if you have recently upgraded or changed dependencies. If the issue persists, review recent changes in your CDK application code for any non-standard or incorrectly configured constructs that might produce an invalid manifest.
Upgrade
Version history
54.21.0latest on PyPI · released Aug 26, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.9 or later for compatibility with `aws-cdk-lib`.
Agent activity
22 hits · last 30 days
node
20
Resources
aws-cdk-cloud-assembly-schema — pip install aws-cdk-cloud-assembly-schema · libregistry