# BootstraplessSynthesizer

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.

Extends: StackSynthesizer › DefaultStackSynthesizer › BootstraplessSynthesizer
Implements: IBoundStackSynthesizer, IReusableStackSynthesizer, IStackSynthesizer

- Source: [`core/lib/stack-synthesizers/bootstrapless-synthesizer.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/stack-synthesizers/bootstrapless-synthesizer.ts#L55)
- Type last changed: v2.81.0 · 25 May 2023

## Example

```ts
// 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',
  qualifier: 'qualifier',
});
```

## Initializer

```ts
new BootstraplessSynthesizer(props?: BootstraplessSynthesizerProps)
```

## Properties

- `bootstrapQualifier`: string — The qualifier used to bootstrap this stack.

- `cloudFormationExecutionRole`: string — The role that is passed to CloudFormation to execute the change set.

- `cloudFormationExecutionRoleArn`: string — Returns the ARN of the CFN execution Role.

- `DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER`: string (static) — Default bootstrap stack version SSM parameter.

- `DEFAULT_CLOUDFORMATION_ROLE_ARN`: string (static) — Default CloudFormation role ARN.

- `DEFAULT_DEPLOY_ROLE_ARN`: string (static) — Default deploy role ARN.

- `DEFAULT_DOCKER_ASSET_PREFIX`: string (static) — Default Docker asset prefix.

- `DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME`: string (static) — Name of the CloudFormation Export with the asset key name.

- `DEFAULT_FILE_ASSET_PREFIX`: string (static) — Default file asset prefix.

- `DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN`: string (static) — Default asset publishing role ARN for file (S3) assets.

- `DEFAULT_FILE_ASSETS_BUCKET_NAME`: string (static) — Default file assets bucket name.

- `DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN`: string (static) — Default asset publishing role ARN for image (ECR) assets.

- `DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME`: string (static) — Default image assets repository name.

- `DEFAULT_LOOKUP_ROLE_ARN`: string (static) — Default lookup role ARN for missing values.

- `DEFAULT_QUALIFIER`: string (static) — Default ARN qualifier.

- `deployRoleArn`: string — Returns the ARN of the deploy Role.

- `lookupRole`: string — The role used to lookup for this stack.

## Methods

- `addDockerImageAsset(_asset: DockerImageAssetSource): 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: FileAssetSource): 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: Stack): void` — 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: Stack): IBoundStackSynthesizer` — Produce a bound Stack Synthesizer for the given stack.

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

- `synthesize(session: ISynthesisSession): void` — Synthesize the associated stack to the session.
