# FeatureFlags

Features that are implemented behind a flag in order to preserve backwards compatibility for existing apps.

The list of flags are available in the
`aws-cdk-lib/cx-api` module.

The state of the flag for this application is stored as a CDK context variable.

- Source: [`core/lib/feature-flags.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/core/lib/feature-flags.ts#L14)
- Type last changed: v2.18.0 · 29 Mar 2022

## 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 featureFlags = cdk.FeatureFlags.of(this);
```

## Methods

- `isEnabled(featureFlag: string): boolean` — Check whether a feature flag is enabled.

  If configured, the flag is present in
  the construct node context. Falls back to the defaults defined in the `cx-api`
  module.

- `of(scope: IConstruct): FeatureFlags // chainable` (static) — Inspect feature flags on the construct node's context.
