Skip to content

Aws Cdk Lib.cfn Output

docs.aws.amazon.com • December 1, 2026

If the condition evaluates to false , this output value will not be included in the stack.

Default: No description.

The description can be a maximum of 4 K in length.

Default: the output is not exported

To import the value from another stack, use Fn.importValue(exportName) .

The value of an output can include literals, parameter references, pseudo-parameters, a mapping value, or intrinsic functions.

Default: No condition is associated with the output.

If the condition evaluates to false , this output value will not be included in the stack.

Default: No description.

The description can be a maximum of 4 K in length.

Default: the output is not exported

To use the value in another stack, pass the value of output.importValue to it.

The returned value should not be used in the same stack, but in a different one. It must be deployed to the same environment, as CloudFormation exports can only be imported in the same Region and account.

The is no automatic registration of dependencies between stacks when using this mechanism, so you should make sure to deploy them in the right order yourself.

You can use this mechanism to values across Stacks in different Stages. If you intend to the value to another Stack inside the same Stage, the automatic cross-stack referencing mechanism is more convenient.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId) .

CfnElements must be defined within a stack scope (directly or indirectly).

The value of an output can include literals, parameter references, pseudo-parameters, a mapping value, or intrinsic functions.

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof , and using this type-testing method instead.

x x x x X — Any object.

Returns: true if x is an object created from a class which extends Construct .

newLogicalId new_logical_id newLogicalId newLogicalId NewLogicalId — The new logical ID to use for this stack element.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Extracted Entities

Companies (1)