AWS CDK Cloud Assembly Schema

53.14.0 · active · verified Thu Apr 09

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.

Warnings

Install

Imports

Quickstart

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()

view raw JSON →