Skip to content
v2.275.0

BootstraplessSynthesizer Class ​

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 ​

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',
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

bootstrapless_synthesizer = cdk.BootstraplessSynthesizer(
    cloud_formation_execution_role_arn="cloudFormationExecutionRoleArn",
    deploy_role_arn="deployRoleArn",
    qualifier="qualifier"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

BootstraplessSynthesizer bootstraplessSynthesizer = BootstraplessSynthesizer.Builder.create()
        .cloudFormationExecutionRoleArn("cloudFormationExecutionRoleArn")
        .deployRoleArn("deployRoleArn")
        .qualifier("qualifier")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;

var bootstraplessSynthesizer = new BootstraplessSynthesizer(new BootstraplessSynthesizerProps {
    CloudFormationExecutionRoleArn = "cloudFormationExecutionRoleArn",
    DeployRoleArn = "deployRoleArn",
    Qualifier = "qualifier"
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

bootstraplessSynthesizer := cdk.NewBootstraplessSynthesizer(&BootstraplessSynthesizerProps{
	CloudFormationExecutionRoleArn: jsii.String("cloudFormationExecutionRoleArn"),
	DeployRoleArn: jsii.String("deployRoleArn"),
	Qualifier: jsii.String("qualifier"),
})

Initializer ​

ts
new BootstraplessSynthesizer(props?: BootstraplessSynthesizerProps)
python
BootstraplessSynthesizer(props: typing.Optional[BootstraplessSynthesizerProps] = None)
java
new BootstraplessSynthesizer(BootstraplessSynthesizerProps props)
csharp
new BootstraplessSynthesizer(BootstraplessSynthesizerProps? props = null)
go
NewBootstraplessSynthesizer(Props BootstraplessSynthesizerProps)

Properties ​

bootstrapQualifiermay be undefinedstringbootstrap_qualifiermay be undefinedstrbootstrapQualifiermay be undefinedStringBootstrapQualifiermay be undefinedstringBootstrapQualifiermay be undefined*string#
The qualifier used to bootstrap this stack.
cloudFormationExecutionRolemay be undefinedstringcloud_formation_execution_rolemay be undefinedstrcloudFormationExecutionRolemay be undefinedStringCloudFormationExecutionRolemay be undefinedstringCloudFormationExecutionRolemay be undefined*string#
The role that is passed to CloudFormation to execute the change set.
cloudFormationExecutionRoleArnstringcloud_formation_execution_role_arnstrcloudFormationExecutionRoleArnStringCloudFormationExecutionRoleArnstringCloudFormationExecutionRoleArn*string#
Returns the ARN of the CFN execution Role.
DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETERstringdefault_bootstrap_stack_version_ssm_parameterstrDEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETERStringDEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETERstringDEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER*stringstatic#
Default bootstrap stack version SSM parameter.
DEFAULT_CLOUDFORMATION_ROLE_ARNstringdefault_cloudformation_role_arnstrDEFAULT_CLOUDFORMATION_ROLE_ARNStringDEFAULT_CLOUDFORMATION_ROLE_ARNstringDEFAULT_CLOUDFORMATION_ROLE_ARN*stringstatic#
Default CloudFormation role ARN.
DEFAULT_DEPLOY_ROLE_ARNstringdefault_deploy_role_arnstrDEFAULT_DEPLOY_ROLE_ARNStringDEFAULT_DEPLOY_ROLE_ARNstringDEFAULT_DEPLOY_ROLE_ARN*stringstatic#
Default deploy role ARN.
DEFAULT_DOCKER_ASSET_PREFIXstringdefault_docker_asset_prefixstrDEFAULT_DOCKER_ASSET_PREFIXStringDEFAULT_DOCKER_ASSET_PREFIXstringDEFAULT_DOCKER_ASSET_PREFIX*stringstatic#
Default Docker asset prefix.
DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAMEstringdefault_file_asset_key_arn_export_namestrDEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAMEStringDEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAMEstringDEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME*stringstatic#
Name of the CloudFormation Export with the asset key name.
DEFAULT_FILE_ASSET_PREFIXstringdefault_file_asset_prefixstrDEFAULT_FILE_ASSET_PREFIXStringDEFAULT_FILE_ASSET_PREFIXstringDEFAULT_FILE_ASSET_PREFIX*stringstatic#
Default file asset prefix.
DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARNstringdefault_file_asset_publishing_role_arnstrDEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARNStringDEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARNstringDEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN*stringstatic#
Default asset publishing role ARN for file (S3) assets.
DEFAULT_FILE_ASSETS_BUCKET_NAMEstringdefault_file_assets_bucket_namestrDEFAULT_FILE_ASSETS_BUCKET_NAMEStringDEFAULT_FILE_ASSETS_BUCKET_NAMEstringDEFAULT_FILE_ASSETS_BUCKET_NAME*stringstatic#
Default file assets bucket name.
DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARNstringdefault_image_asset_publishing_role_arnstrDEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARNStringDEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARNstringDEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN*stringstatic#
Default asset publishing role ARN for image (ECR) assets.
DEFAULT_IMAGE_ASSETS_REPOSITORY_NAMEstringdefault_image_assets_repository_namestrDEFAULT_IMAGE_ASSETS_REPOSITORY_NAMEStringDEFAULT_IMAGE_ASSETS_REPOSITORY_NAMEstringDEFAULT_IMAGE_ASSETS_REPOSITORY_NAME*stringstatic#
Default image assets repository name.
DEFAULT_LOOKUP_ROLE_ARNstringdefault_lookup_role_arnstrDEFAULT_LOOKUP_ROLE_ARNStringDEFAULT_LOOKUP_ROLE_ARNstringDEFAULT_LOOKUP_ROLE_ARN*stringstatic#
Default lookup role ARN for missing values.
DEFAULT_QUALIFIERstringdefault_qualifierstrDEFAULT_QUALIFIERStringDEFAULT_QUALIFIERstringDEFAULT_QUALIFIER*stringstatic#
Default ARN qualifier.
deployRoleArnstringdeploy_role_arnstrdeployRoleArnStringDeployRoleArnstringDeployRoleArn*string#
Returns the ARN of the deploy Role.
lookupRolemay be undefinedstringlookup_rolemay be undefinedstrlookupRolemay be undefinedStringLookupRolemay be undefinedstringLookupRolemay be undefined*string#
The role used to lookup for this stack.

Methods ​

addDockerImageAsset(_asset: DockerImageAssetSource): DockerImageAssetLocationdef add_docker_image_asset(self, _asset: DockerImageAssetSource) -> DockerImageAssetLocationpublic DockerImageAssetLocation addDockerImageAsset(DockerImageAssetSource _asset)public DockerImageAssetLocation AddDockerImageAsset(DockerImageAssetSource _asset)func AddDockerImageAsset(_asset DockerImageAssetSource) DockerImageAssetLocation#
Register a Docker Image Asset.
notes

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): FileAssetLocationdef add_file_asset(self, _asset: FileAssetSource) -> FileAssetLocationpublic FileAssetLocation addFileAsset(FileAssetSource _asset)public FileAssetLocation AddFileAsset(FileAssetSource _asset)func AddFileAsset(_asset FileAssetSource) FileAssetLocation#
Register a File Asset.
notes

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): voiddef bind(self, stack: Stack) -> Nonepublic void bind(Stack stack)public void Bind(Stack stack)func Bind(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: Stack): IBoundStackSynthesizerdef reusable_bind(self, stack: Stack) -> IBoundStackSynthesizerpublic IBoundStackSynthesizer reusableBind(Stack stack)public IBoundStackSynthesizer ReusableBind(Stack stack)func 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): voiddef synthesize(self, session: ISynthesisSession) -> Nonepublic void synthesize(ISynthesisSession session)public void Synthesize(ISynthesisSession session)func Synthesize(Session ISynthesisSession)#
Synthesize the associated stack to the session.