aws-cdk-lib.BootstraplessSynthesizer

class BootstraplessSynthesizer

LanguageType name
.NETAmazon.CDK.BootstraplessSynthesizer
Gogithub.com/aws/aws-cdk-go/awscdk/v2#BootstraplessSynthesizer
Javasoftware.amazon.awscdk.BootstraplessSynthesizer
Pythonaws_cdk.BootstraplessSynthesizer
TypeScript (source)aws-cdk-lib » BootstraplessSynthesizer

Implements IStackSynthesizer, IReusableStackSynthesizer, IBoundStackSynthesizer

Extends DefaultStackSynthesizer

Synthesizer that reuses bootstrap roles from a different region.

A special synthesizer that behaves similarly to DefaultStackSynthesizer, but doesn't require bootstrapping the environment it operates in. Instead, it will re-use the Roles that were created for a different region (which is possible because IAM is a global service).

However, it will not assume asset buckets or repositories have been created, and therefore does not support assets.

The name is poorly chosen -- it does still require bootstrapping, it just does not support assets.

Used by the CodePipeline construct for the support stacks needed for cross-region replication S3 buckets. App builders do not need to use this synthesizer directly.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const bootstraplessSynthesizer = new cdk.BootstraplessSynthesizer(/* all optional props */ {
  cloudFormationExecutionRoleArn: 'cloudFormationExecutionRoleArn',
  deployRoleArn: 'deployRoleArn',
});

Initializer

new BootstraplessSynthesizer(props?: BootstraplessSynthesizerProps)

Parameters

  • props BootstraplessSynthesizerProps

Properties

NameTypeDescription
cloudFormationExecutionRoleArnstringReturns the ARN of the CFN execution Role.
deployRoleArnstringReturns the ARN of the deploy Role.
bootstrapQualifier?stringThe qualifier used to bootstrap this stack.
lookupRole?stringThe role used to lookup for this stack.

cloudFormationExecutionRoleArn

Type: string

Returns the ARN of the CFN execution Role.


deployRoleArn

Type: string

Returns the ARN of the deploy Role.


bootstrapQualifier?

Type: string (optional)

The qualifier used to bootstrap this stack.


lookupRole?

Type: string (optional)

The role used to lookup for this stack.

Methods

NameDescription
addDockerImageAsset(_asset)Register a Docker Image Asset.
addFileAsset(_asset)Register a File Asset.
bind(stack)Bind to the stack this environment is going to be used on.
reusableBind(stack)Produce a bound Stack Synthesizer for the given stack.
synthesize(session)Synthesize the associated stack to the session.

addDockerImageAsset(_asset)

public addDockerImageAsset(_asset: DockerImageAssetSource): DockerImageAssetLocation

Parameters

  • _asset DockerImageAssetSource

Returns

  • DockerImageAssetLocation

Register a Docker Image Asset.

Returns the parameters that can be used to refer to the asset inside the template.

The synthesizer must rely on some out-of-band mechanism to make sure the given files are actually placed in the returned location before the deployment happens. This can be by writing the instructions to the asset manifest (for use by the cdk-assets tool), by relying on the CLI to upload files (legacy behavior), or some other operator controlled mechanism.


addFileAsset(_asset)

public addFileAsset(_asset: FileAssetSource): FileAssetLocation

Parameters

  • _asset FileAssetSource

Returns

  • FileAssetLocation

Register a File Asset.

Returns the parameters that can be used to refer to the asset inside the template.

The synthesizer must rely on some out-of-band mechanism to make sure the given files are actually placed in the returned location before the deployment happens. This can be by writing the instructions to the asset manifest (for use by the cdk-assets tool), by relying on the CLI to upload files (legacy behavior), or some other operator controlled mechanism.


bind(stack)

public bind(stack: Stack): void

Parameters

  • stack Stack

Bind to the stack this environment is going to be used on.

Must be called before any of the other methods are called.


reusableBind(stack)

public reusableBind(stack: Stack): IBoundStackSynthesizer

Parameters

  • stack Stack

Returns

  • IBoundStackSynthesizer

Produce a bound Stack Synthesizer for the given stack.

This method may be called more than once on the same object.


synthesize(session)

public synthesize(session: ISynthesisSession): void

Parameters

  • session ISynthesisSession

Synthesize the associated stack to the session.