Skip to content
v2.275.0

DefaultStackSynthesizerProps Struct ​

Configuration properties for DefaultStackSynthesizer.

Example ​

ts
declare const app: App;

const prodStage = new Stage(app, 'ProdStage', {
  permissionsBoundary: PermissionsBoundary.fromName('cdk-${Qualifier}-PermissionsBoundary-${AWS::AccountId}-${AWS::Region}'),
});

new Stack(prodStage, 'ProdStack', {
  synthesizer: new DefaultStackSynthesizer({
    qualifier: 'custom',
  }),
});

Properties ​

bootstrapStackVersionSsmParameteroptionalstringbootstrap_stack_version_ssm_parameteroptionalstrbootstrapStackVersionSsmParameteroptionalStringBootstrapStackVersionSsmParameteroptionalstringBootstrapStackVersionSsmParameteroptional*string#
Bootstrap stack version SSM parameter.

Default: DefaultStackSynthesizer.DEFAULT_BOOTSTRAP_STACK_VERSION_SSM_PARAMETER

The placeholder ${Qualifier} will be replaced with the value of qualifier.

bucketPrefixoptionalstringbucket_prefixoptionalstrbucketPrefixoptionalStringBucketPrefixoptionalstringBucketPrefixoptional*string#
bucketPrefix to use while storing S3 Assets.

Default: DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PREFIX

cloudFormationExecutionRoleoptionalstringcloud_formation_execution_roleoptionalstrcloudFormationExecutionRoleoptionalStringCloudFormationExecutionRoleoptionalstringCloudFormationExecutionRoleoptional*string#
The role CloudFormation will assume when deploying the Stack.

Default: DefaultStackSynthesizer.DEFAULT_CLOUDFORMATION_ROLE_ARN

notes

You must supply this if you have given a non-standard name to the execution role.

The placeholders ${Qualifier}, ${AWS::AccountId} and ${AWS::Region} will be replaced with the values of qualifier and the stack's account and region, respectively.

deployRoleAdditionalOptionsoptional{ [key: string]: any }deploy_role_additional_optionsoptionaltyping.Mapping[str, Any]deployRoleAdditionalOptionsoptionalMap<String, Object>DeployRoleAdditionalOptionsoptionalIDictionary<string, object>DeployRoleAdditionalOptionsoptional*map[string]interface{}#
Additional options to pass to STS when assuming the deploy role.

Default: No additional options.

notes
  • RoleArn should not be used. Use the dedicated deployRoleArn property instead.
  • ExternalId should not be used. Use the dedicated deployRoleExternalId instead.
  • TransitiveTagKeys defaults to use all keys (if any) specified in Tags. E.g, all tags are transitive by default.
deployRoleArnoptionalstringdeploy_role_arnoptionalstrdeployRoleArnoptionalStringDeployRoleArnoptionalstringDeployRoleArnoptional*string#
The role to assume to initiate a deployment in this environment.

Default: DefaultStackSynthesizer.DEFAULT_DEPLOY_ROLE_ARN

notes

You must supply this if you have given a non-standard name to the publishing role.

The placeholders ${Qualifier}, ${AWS::AccountId} and ${AWS::Region} will be replaced with the values of qualifier and the stack's account and region, respectively.

deployRoleExternalIdoptionalstringdeploy_role_external_idoptionalstrdeployRoleExternalIdoptionalStringDeployRoleExternalIdoptionalstringDeployRoleExternalIdoptional*string#
External ID to use when assuming role for cloudformation deployments.

Default: No external ID

dockerTagPrefixoptionalstringdocker_tag_prefixoptionalstrdockerTagPrefixoptionalStringDockerTagPrefixoptionalstringDockerTagPrefixoptional*string#
A prefix to use while tagging and uploading Docker images to ECR.

Default: DefaultStackSynthesizer.DEFAULT_DOCKER_ASSET_PREFIX

This does not add any separators - the source hash will be appended to this string directly.

fileAssetPublishingExternalIdoptionalstringfile_asset_publishing_external_idoptionalstrfileAssetPublishingExternalIdoptionalStringFileAssetPublishingExternalIdoptionalstringFileAssetPublishingExternalIdoptional*string#
External ID to use when assuming role for file asset publishing.

Default: No external ID

fileAssetPublishingRoleAdditionalOptionsoptional{ [key: string]: any }file_asset_publishing_role_additional_optionsoptionaltyping.Mapping[str, Any]fileAssetPublishingRoleAdditionalOptionsoptionalMap<String, Object>FileAssetPublishingRoleAdditionalOptionsoptionalIDictionary<string, object>FileAssetPublishingRoleAdditionalOptionsoptional*map[string]interface{}#
Additional options to pass to STS when assuming the file asset publishing.

Default: No additional options.

notes
  • RoleArn should not be used. Use the dedicated fileAssetPublishingRoleArn property instead.
  • ExternalId should not be used. Use the dedicated fileAssetPublishingExternalId instead.
  • TransitiveTagKeys defaults to use all keys (if any) specified in Tags. E.g, all tags are transitive by default.
fileAssetPublishingRoleArnoptionalstringfile_asset_publishing_role_arnoptionalstrfileAssetPublishingRoleArnoptionalStringFileAssetPublishingRoleArnoptionalstringFileAssetPublishingRoleArnoptional*string#
The role to use to publish file assets to the S3 bucket in this environment.

Default: DefaultStackSynthesizer.DEFAULT_FILE_ASSET_PUBLISHING_ROLE_ARN

notes

You must supply this if you have given a non-standard name to the publishing role.

The placeholders ${Qualifier}, ${AWS::AccountId} and ${AWS::Region} will be replaced with the values of qualifier and the stack's account and region, respectively.

fileAssetsBucketNameoptionalstringfile_assets_bucket_nameoptionalstrfileAssetsBucketNameoptionalStringFileAssetsBucketNameoptionalstringFileAssetsBucketNameoptional*string#
Name of the S3 bucket to hold file assets.

Default: DefaultStackSynthesizer.DEFAULT_FILE_ASSETS_BUCKET_NAME

notes

You must supply this if you have given a non-standard name to the staging bucket.

The placeholders ${Qualifier}, ${AWS::AccountId} and ${AWS::Region} will be replaced with the values of qualifier and the stack's account and region, respectively.

generateBootstrapVersionRuleoptionalbooleangenerate_bootstrap_version_ruleoptionalboolgenerateBootstrapVersionRuleoptionalBooleanGenerateBootstrapVersionRuleoptionalboolGenerateBootstrapVersionRuleoptional*bool= true#
Whether to add a Rule to the stack template verifying the bootstrap stack version.

This generally should be left set to true, unless you explicitly want to be able to deploy to an unbootstrapped environment.

imageAssetPublishingExternalIdoptionalstringimage_asset_publishing_external_idoptionalstrimageAssetPublishingExternalIdoptionalStringImageAssetPublishingExternalIdoptionalstringImageAssetPublishingExternalIdoptional*string#
External ID to use when assuming role for image asset publishing.

Default: No external ID

imageAssetPublishingRoleAdditionalOptionsoptional{ [key: string]: any }image_asset_publishing_role_additional_optionsoptionaltyping.Mapping[str, Any]imageAssetPublishingRoleAdditionalOptionsoptionalMap<String, Object>ImageAssetPublishingRoleAdditionalOptionsoptionalIDictionary<string, object>ImageAssetPublishingRoleAdditionalOptionsoptional*map[string]interface{}#
Additional options to pass to STS when assuming the image asset publishing.

Default: No additional options.

notes
  • RoleArn should not be used. Use the dedicated imageAssetPublishingRoleArn property instead.
  • ExternalId should not be used. Use the dedicated imageAssetPublishingExternalId instead.
  • TransitiveTagKeys defaults to use all keys (if any) specified in Tags. E.g, all tags are transitive by default.
imageAssetPublishingRoleArnoptionalstringimage_asset_publishing_role_arnoptionalstrimageAssetPublishingRoleArnoptionalStringImageAssetPublishingRoleArnoptionalstringImageAssetPublishingRoleArnoptional*string#
The role to use to publish image assets to the ECR repository in this environment.

Default: DefaultStackSynthesizer.DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN

notes

You must supply this if you have given a non-standard name to the publishing role.

The placeholders ${Qualifier}, ${AWS::AccountId} and ${AWS::Region} will be replaced with the values of qualifier and the stack's account and region, respectively.

imageAssetsRepositoryNameoptionalstringimage_assets_repository_nameoptionalstrimageAssetsRepositoryNameoptionalStringImageAssetsRepositoryNameoptionalstringImageAssetsRepositoryNameoptional*string#
Name of the ECR repository to hold Docker Image assets.

Default: DefaultStackSynthesizer.DEFAULT_IMAGE_ASSETS_REPOSITORY_NAME

notes

You must supply this if you have given a non-standard name to the ECR repository.

The placeholders ${Qualifier}, ${AWS::AccountId} and ${AWS::Region} will be replaced with the values of qualifier and the stack's account and region, respectively.

lookupRoleAdditionalOptionsoptional{ [key: string]: any }lookup_role_additional_optionsoptionaltyping.Mapping[str, Any]lookupRoleAdditionalOptionsoptionalMap<String, Object>LookupRoleAdditionalOptionsoptionalIDictionary<string, object>LookupRoleAdditionalOptionsoptional*map[string]interface{}#
Additional options to pass to STS when assuming the lookup role.

Default: No additional options.

notes
  • RoleArn should not be used. Use the dedicated lookupRoleArn property instead.
  • ExternalId should not be used. Use the dedicated lookupRoleExternalId instead.
  • TransitiveTagKeys defaults to use all keys (if any) specified in Tags. E.g, all tags are transitive by default.
lookupRoleArnoptionalstringlookup_role_arnoptionalstrlookupRoleArnoptionalStringLookupRoleArnoptionalstringLookupRoleArnoptional*string= None#
The role to use to look up values from the target AWS account during synthesis.
lookupRoleExternalIdoptionalstringlookup_role_external_idoptionalstrlookupRoleExternalIdoptionalStringLookupRoleExternalIdoptionalstringLookupRoleExternalIdoptional*string#
External ID to use when assuming lookup role.

Default: No external ID

qualifieroptionalstringqualifieroptionalstrqualifieroptionalStringQualifieroptionalstringQualifieroptional*string#
Qualifier to disambiguate multiple environments in the same account.

Default: Value of context key '@aws-cdk/core:bootstrapQualifier' if set, otherwise DefaultStackSynthesizer.DEFAULT_QUALIFIER

You can use this and leave the other naming properties empty if you have deployed the bootstrap environment with standard names but only different qualifiers.

useLookupRoleForStackOperationsoptionalbooleanuse_lookup_role_for_stack_operationsoptionalbooluseLookupRoleForStackOperationsoptionalBooleanUseLookupRoleForStackOperationsoptionalboolUseLookupRoleForStackOperationsoptional*bool= true#
Use the bootstrapped lookup role for (read-only) stack operations.

Use the lookup role when performing a cdk diff. If set to false, the deploy role credentials will be used to perform a cdk diff.

Requires bootstrap stack version 8.