# Application

An AWS AppConfig application.

Extends: Construct › Resource › Application
Implements: IResource, IApplication, IExtensible, IEnvironmentAware, IApplicationRef, IConstruct, IDependable

- CloudFormation: [`AWS::AppConfig::Application`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-appconfig-application.html)
- L1 type: [`CfnApplication`](/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.CfnApplication.html)
- Source: [`aws-appconfig/lib/application.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appconfig/lib/application.ts#L350)
- Type last changed: v2.233.0 · 18 Dec 2025

## Example

```ts
const app = new appconfig.Application(this, 'MyApp');
const env = new appconfig.Environment(this, 'MyEnv', {
  application: app,
});

new appconfig.HostedConfiguration(this, 'MyHostedConfig', {
  application: app,
  deployTo: [env],
  content: appconfig.ConfigurationContent.fromInlineText('This is my configuration content.'),
});
```

## Initializer

```ts
new Application(scope: Construct, id: string, props?: ApplicationProps)
```

## Construct Props

- `applicationName`: string — The name of the application.

  **Default:** A name is generated.

- `description`: string — The description for the application.

  **Default:** No description.

## Properties

- `applicationArn`: string — The Amazon Resource Name (ARN) of the application.

- `applicationId`: string — The ID of the application.

- `applicationRef`: [ApplicationReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_appconfig.ApplicationReference.html) — A reference to a Application resource.

- `description`: string — The description of the application.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `name`: string — The name of the application.

- `node`: [Node](/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `PROPERTY_INJECTION_ID`: string (static) — Uniquely identifies this class.

- `stack`: [Stack](/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

## Methods

- `addAgentToEcs(taskDef: TaskDefinition): void` (static) — Adds the AWS AppConfig Agent as a container to the provided ECS task definition.

  **Parameters**

  - `taskDef` — The ECS task definition [disable-awslint:ref-via-interface].

- `addEnvironment(id: string, options?: EnvironmentOptions): IEnvironment` — Adds an environment.

- `addExistingEnvironment(environment: IEnvironmentRef): void` — Adds an existing environment.

- `addExtension(extension: IExtension): void` — Adds an extension association to the application.

  **Parameters**

  - `extension` — The extension to create an association for.

- `addHostedConfiguration(id: string, options: HostedConfigurationOptions): HostedConfiguration` — Adds a hosted configuration.

- `addSourcedConfiguration(id: string, options: SourcedConfigurationOptions): SourcedConfiguration` — Adds a sourced configuration.

- `applyCrossStackReferenceStrength(strength: ReferenceStrength): void` — Override the cross-stack reference strength for this resource.

  When set, any cross-stack reference to this resource will use the specified
  mechanism instead of the global default determined by the
  `@aws-cdk/core:defaultCrossStackReferences` context key. This is useful for
  selectively weakening specific references to avoid the "deadly embrace" problem
  without changing the app-wide default.

  **Parameters**

  - `strength` — - The reference strength to use for this resource.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `atDeploymentTick(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `environments(): IEnvironment[]` — Returns the list of associated environments.

- `fromApplicationArn(scope: Construct, id: string, applicationArn: string): IApplication` (static) — Imports an AWS AppConfig application into the CDK using its Amazon Resource Name (ARN).

  **Parameters**

  - `scope` — The parent construct.
  - `id` — The name of the application construct.
  - `applicationArn` — The Amazon Resource Name (ARN) of the application.

- `fromApplicationId(scope: Construct, id: string, applicationId: string): IApplication` (static) — Imports an AWS AppConfig application into the CDK using its ID.

  **Parameters**

  - `scope` — The parent construct.
  - `id` — The name of the application construct.
  - `applicationId` — The ID of the application.

- `getLambdaLayerVersionArn(region: string, platform?: Platform): string` (static) — Retrieves the Lambda layer version Amazon Resource Name (ARN) for the AWS AppConfig Lambda extension.

  **Parameters**

  - `region` — The region for the Lambda layer (for example, 'us-east-1').
  - `platform` — The platform for the Lambda layer (default is Platform.X86_64).

  **Returns:** Lambda layer version ARN

- `isConstruct(x: any): boolean` (static) — Checks if `x` is a construct.

  Use this method instead of `instanceof` to properly detect `Construct`
  instances, even when the construct library is symlinked.

  Explanation: in JavaScript, multiple copies of the `constructs` library on
  disk are seen as independent, completely different libraries. As a
  consequence, the class `Construct` in each copy of the `constructs` library
  is seen as a different class, and an instance of one class will not test as
  `instanceof` the other class. `npm install` will not create installations
  like this, but users may manually symlink construct libraries together or
  use a monorepo tool: in those cases, multiple copies of the `constructs`
  library can be accidentally installed, and `instanceof` will behave
  unpredictably. It is safest to avoid using `instanceof`, and using
  this type-testing method instead.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Construct`.

- `isOwnedResource(construct: IConstruct): boolean` (static) — Returns true if the construct was created by CDK, and false otherwise.

- `isResource(construct: IConstruct): boolean` (static) — Check whether the given construct is a Resource.

- `on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an extension defined by the action point and event destination and also creates an extension association to an application.

  **Parameters**

  - `actionPoint` — The action point which triggers the event.
  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `toString(): string` — Returns a string representation of this construct.

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.
  Use multiple `with()` calls if subsequent mixins should apply to added
  constructs.
