# DeployOptions

Options to use with cdk deploy.

Extends: DeployOptions
Extends: DefaultCdkOptions

- Source: [`node_modules/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.d.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.d.ts#L5)
- Type last changed: v2.184.0 · 13 Mar 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const deployOptions: cloud_assembly_schema.DeployOptions = {
  all: false,
  app: 'app',
  assetMetadata: false,
  caBundlePath: 'caBundlePath',
  changeSetName: 'changeSetName',
  ci: false,
  color: false,
  concurrency: 123,
  context: {
    contextKey: 'context',
  },
  debug: false,
  ec2Creds: false,
  exclusively: false,
  execute: false,
  force: false,
  ignoreErrors: false,
  json: false,
  lookups: false,
  notices: false,
  notificationArns: ['notificationArns'],
  output: 'output',
  outputsFile: 'outputsFile',
  parameters: {
    parametersKey: 'parameters',
  },
  pathMetadata: false,
  profile: 'profile',
  proxy: 'proxy',
  requireApproval: cloud_assembly_schema.RequireApproval.NEVER,
  reuseAssets: ['reuseAssets'],
  roleArn: 'roleArn',
  rollback: false,
  stacks: ['stacks'],
  staging: false,
  strict: false,
  toolkitStackName: 'toolkitStackName',
  trace: false,
  usePreviousParameters: false,
  verbose: false,
  versionReporting: false,
};
```

## Properties

- `all`: boolean = false — Deploy all stacks.

  Requried if `stacks` is not set

- `app`: string — command-line for executing your app or a cloud assembly directory e.g. "node bin/my-app.js" or "cdk.out".

  **Default:** read from cdk.json

- `assetMetadata`: boolean = true — Include "aws:asset:*" CloudFormation metadata for resources that use assets.

- `caBundlePath`: string — Path to CA certificate to use when validating HTTPS requests.

  **Default:** read from AWS_CA_BUNDLE environment variable

- `changeSetName`: string — Optional name to use for the CloudFormation change set.

  **Default:** auto generate a name

  If not provided, a name will be generated automatically.

- `ci`: boolean = false — Whether we are on a CI system.

- `color`: boolean = true — Show colors and other style from console output.

- `concurrency`: number = 1 — Deploy multiple stacks in parallel.

- `context`: { [key: string]: string } — Additional context.

  **Default:** no additional context

- `debug`: boolean = false — enable emission of additional debugging information, such as creation stack traces of tokens.

- `ec2Creds`: boolean — Force trying to fetch EC2 instance credentials.

  **Default:** guess EC2 instance status

- `exclusively`: boolean = false — Only perform action on the given stack.

- `execute`: boolean = true — Whether to execute the ChangeSet Not providing `execute` parameter will result in execution of ChangeSet.

- `force`: boolean = false — Always deploy, even if templates are identical.

- `ignoreErrors`: boolean = false — Ignores synthesis errors, which will likely produce an invalid output.

- `json`: boolean = false — Use JSON output instead of YAML when templates are printed to STDOUT.

- `lookups`: boolean = true — Perform context lookups.

  Synthesis fails if this is disabled and context lookups need
  to be performed

- `notices`: boolean = true — Show relevant notices.

- `notificationArns`: string[] — ARNs of SNS topics that CloudFormation will notify with stack related events.

  **Default:** no notifications

- `output`: string = cdk.out — Emits the synthesized cloud assembly into a directory.

- `outputsFile`: string — Path to file where stack outputs will be written after a successful deploy as JSON.

  **Default:** Outputs are not written to any file

- `parameters`: { [key: string]: string } = {} — Additional parameters for CloudFormation at deploy time.

- `pathMetadata`: boolean = true — Include "aws:cdk:path" CloudFormation metadata for each resource.

- `profile`: string — Use the indicated AWS profile as the default environment.

  **Default:** no profile is used

- `proxy`: string — Use the indicated proxy.

  **Default:** no proxy

  Will read from
  HTTPS_PROXY environment if specified

- `requireApproval`: [RequireApproval](/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.RequireApproval.html) = RequireApproval.NEVER — What kind of security changes require approval.

- `reuseAssets`: string[] — Reuse the assets with the given asset IDs.

  **Default:** do not reuse assets

- `roleArn`: string — Role to pass to CloudFormation for deployment.

  **Default:** use the bootstrap cfn-exec role

- `rollback`: boolean = true — Rollback failed deployments.

- `stacks`: string[] = [] — List of stacks to deploy.

  Requried if `all` is not set

- `staging`: boolean = false — Copy assets to the output directory.

  Needed for local debugging the source files with SAM CLI

- `strict`: boolean = false — Do not construct stacks with warnings.

- `toolkitStackName`: string = CDKToolkit — Name of the toolkit stack to use/deploy.

- `trace`: boolean = false — Print trace for stack warnings.

- `usePreviousParameters`: boolean = true — Use previous values for unspecified parameters.

  If not set, all parameters must be specified for every deployment.

- `verbose`: boolean = false — show debug logs.

- `versionReporting`: boolean = true — Include "AWS::CDK::Metadata" resource in synthesized templates.
