Skip to content
v2.278.0

Experimental

@aws-cdk/app-staging-synthesizer-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

DeploymentIdentities Class ​

Deployment identities are the class of roles to be assumed by the CDK when deploying the App.

Example ​

ts
import { BucketEncryption } from 'aws-cdk-lib/aws-s3';

const app = new App({
  defaultStackSynthesizer: AppStagingSynthesizer.defaultResources({
    appId: 'my-app-id',
    stagingBucketEncryption: BucketEncryption.S3_MANAGED,

    // The following line is optional. By default it is assumed you have bootstrapped in the same
    // region(s) as the stack(s) you are deploying.
    deploymentIdentities: DeploymentIdentities.defaultBootstrapRoles({ bootstrapRegion: 'us-east-1' }),
  }),
});
python
from aws_cdk.aws_s3 import BucketEncryption


app = App(
    default_stack_synthesizer=AppStagingSynthesizer.default_resources(
        app_id="my-app-id",
        staging_bucket_encryption=BucketEncryption.S3_MANAGED,

        # The following line is optional. By default it is assumed you have bootstrapped in the same
        # region(s) as the stack(s) you are deploying.
        deployment_identities=DeploymentIdentities.default_bootstrap_roles(bootstrap_region="us-east-1")
    )
)
java
import software.amazon.awscdk.services.s3.BucketEncryption;


App app = App.Builder.create()
        .defaultStackSynthesizer(AppStagingSynthesizer.defaultResources(DefaultResourcesOptions.builder()
                .appId("my-app-id")
                .stagingBucketEncryption(BucketEncryption.S3_MANAGED)

                // The following line is optional. By default it is assumed you have bootstrapped in the same
                // region(s) as the stack(s) you are deploying.
                .deploymentIdentities(DeploymentIdentities.defaultBootstrapRoles(DefaultBootstrapRolesOptions.builder().bootstrapRegion("us-east-1").build()))
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AppStagingSynthesizer.Alpha
using Amazon.CDK.AWS.S3;


var app = new App(new AppProps {
    DefaultStackSynthesizer = AppStagingSynthesizer.DefaultResources(new DefaultResourcesOptions {
        AppId = "my-app-id",
        StagingBucketEncryption = BucketEncryption.S3_MANAGED,

        // The following line is optional. By default it is assumed you have bootstrapped in the same
        // region(s) as the stack(s) you are deploying.
        DeploymentIdentities = DeploymentIdentities.DefaultBootstrapRoles(new DefaultBootstrapRolesOptions { BootstrapRegion = "us-east-1" })
    })
});
go
// Install: go get github.com/aws/aws-cdk-go/appstagingsynthesizeralpha/v2
import "github.com/aws/aws-cdk-go/awscdk"


app := awscdk.NewApp(&AppProps{
	DefaultStackSynthesizer: appstagingsynthesizeralpha.AppStagingSynthesizer_DefaultResources(&DefaultResourcesOptions{
		AppId: jsii.String("my-app-id"),
		StagingBucketEncryption: awscdk.BucketEncryption_S3_MANAGED,

		// The following line is optional. By default it is assumed you have bootstrapped in the same
		// region(s) as the stack(s) you are deploying.
		DeploymentIdentities: appstagingsynthesizeralpha.DeploymentIdentities_DefaultBootstrapRoles(&DefaultBootstrapRolesOptions{
			BootstrapRegion: jsii.String("us-east-1"),
		}),
	}),
})

Properties ​

cloudFormationExecutionRolemay be undefinedBootstrapRolecloud_formation_execution_rolemay be undefinedBootstrapRolecloudFormationExecutionRolemay be undefinedBootstrapRoleCloudFormationExecutionRolemay be undefinedBootstrapRoleCloudFormationExecutionRolemay be undefinedBootstrapRole #
CloudFormation Execution Role.
deploymentRolemay be undefinedBootstrapRoledeployment_rolemay be undefinedBootstrapRoledeploymentRolemay be undefinedBootstrapRoleDeploymentRolemay be undefinedBootstrapRoleDeploymentRolemay be undefinedBootstrapRole #
Deployment Action Role.
lookupRolemay be undefinedBootstrapRolelookup_rolemay be undefinedBootstrapRolelookupRolemay be undefinedBootstrapRoleLookupRolemay be undefinedBootstrapRoleLookupRolemay be undefinedBootstrapRole #
Lookup Role.

Default: use bootstrapped role

Methods ​

cliCredentials(): DeploymentIdentities // chainable@staticmethod def cli_credentials() -> DeploymentIdentitiespublic static DeploymentIdentities cliCredentials()public static DeploymentIdentities CliCredentials()func CliCredentials() DeploymentIdentities static #
Use CLI credentials for all deployment identities.
defaultBootstrapRoles(options?: DefaultBootstrapRolesOptions): DeploymentIdentities // chainable@staticmethod def default_bootstrap_roles(options: typing.Optional[DefaultBootstrapRolesOptions] = None) -> DeploymentIdentitiespublic static DeploymentIdentities defaultBootstrapRoles(DefaultBootstrapRolesOptions options)public static DeploymentIdentities DefaultBootstrapRoles(DefaultBootstrapRolesOptions? options = null)func DefaultBootstrapRoles(Options DefaultBootstrapRolesOptions) DeploymentIdentities static #
Use the Roles that have been created by the default bootstrap stack.
specifyRoles(roles: BootstrapRoles): DeploymentIdentities // chainable@staticmethod def specify_roles(roles: BootstrapRoles) -> DeploymentIdentitiespublic static DeploymentIdentities specifyRoles(BootstrapRoles roles)public static DeploymentIdentities SpecifyRoles(BootstrapRoles roles)func SpecifyRoles(Roles BootstrapRoles) DeploymentIdentities static #
Specify your own roles for all deployment identities.

These roles must already exist.