@aws-cdk/cloud-assembly-schema

中文文档
55.4.0发布于 2026/11/06Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 2214.3万

Schema for the protocol between CDK framework and CDK CLI

原始使用文档
文档目录5 节
  1. Cloud Assembly
  2. Schema
  3. Versioning
  4. How to consume
  5. Contributing

Cloud Assembly Schema

This module is part of the AWS Cloud Development Kit project.

Cloud Assembly

The Cloud Assembly is the output of the synthesis operation. It is produced as part of the cdk synth command, or the app.synth() method invocation.

Its essentially a set of files and directories, one of which is the manifest.json file. It defines the set of instructions that are needed in order to deploy the assembly directory.

For example, when cdk deploy is executed, the CLI reads this file and performs its instructions:

  • Build container images.
  • Upload assets.
  • Deploy CloudFormation templates.

Therefore, the assembly is how the CDK class library and CDK CLI (or any other consumer) communicate. To ensure compatibility between the assembly and its consumers, we treat the manifest file as a well defined, versioned schema.

Schema

This module contains the typescript structs that comprise the manifest.json file, as well as the generated json-schema.

Versioning

The schema version is specified my the major version of the package release. It follows semantic versioning, but with a small twist.

When we add instructions to the assembly, they are reflected in the manifest file and the json-schema accordingly. Every such instruction, is crucial for ensuring the correct deployment behavior. This means that to properly deploy a cloud assembly, consumers must be aware of every such instruction modification.

For this reason, every change to the schema, even though it might not strictly break validation of the json-schema format, is considered major version bump. All changes that do not impact the schema are considered a minor version bump.

How to consume

If you'd like to consume the schema file in order to do validations on manifest.json files, simply download it from this repo and run it against standard json-schema validators, such as jsonschema.

Consumers must take into account the major version of the schema they are consuming. They should reject cloud assemblies with a major version that is higher than what they expect. While schema validation might pass on such assemblies, the deployment integrity cannot be guaranteed because some instructions will be ignored.

For example, if your consumer was built when the schema version was 2.0.0, you should reject deploying cloud assemblies with a manifest version of 3.0.0.

Contributing

See Contribution Guide

版本与发布记录

@aws-cdk/cloud-assembly-schema 共发布 711 个版本,首次发布于 2020/04/18;过去 12 个月发布了 76 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
55.4.0latest2026/11/062 天前
55.3.02026/10/318 天前
55.2.02026/10/2216 天前
55.1.02026/10/2018 天前
55.0.02026/10/0830 天前
54.26.02026/10/011 个月前

其他发布通道:next → 2.0.0-rc.33,latest-1 → 1.204.0。

关于 @aws-cdk/cloud-assembly-schema 的常见问题

@aws-cdk/cloud-assembly-schema 是什么?

Schema for the protocol between CDK framework and CDK CLI

如何安装 @aws-cdk/cloud-assembly-schema?

在项目目录运行 npm install @aws-cdk/cloud-assembly-schema,或使用 pnpm add / yarn add / bun add。

@aws-cdk/cloud-assembly-schema 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aws-cdk/cloud-assembly-schema 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aws-cdk/cloud-assembly-schema 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@aws-cdk/cloud-assembly-schema 可以商用吗?

@aws-cdk/cloud-assembly-schema 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@aws-cdk/cloud-assembly-schema 的下载量有多少?

根据 npm 官方下载统计,@aws-cdk/cloud-assembly-schema 在 2026/10/08 – 2026/11/06 这 30 天内被下载 22,143,463 次,日均约 738,115 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aws-cdk/cloud-assembly-schema 还在维护吗?

最新版本 55.4.0 发布于 2026/11/06(2 天前);至今共发布 711 个版本,其中过去 12 个月发布了 76 个;首次发布于 2020/04/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。