# CfnEnvironment

The `AWS::MWAA::Environment` resource creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.

Extends: Construct › CfnElement › CfnRefElement › CfnResource › CfnEnvironment
Implements: IInspectable, ITaggable, IEnvironmentAware, IEnvironmentRef, IConstruct, IDependable

- CloudFormation: [`AWS::MWAA::Environment`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-mwaa-environment.html)
- Source: Generated code
- Type last changed: v2.252.0 · 30 Apr 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_mwaa as mwaa } from 'aws-cdk-lib';

declare const airflowConfigurationOptions: any;
declare const tags: any;
const cfnEnvironment = new mwaa.CfnEnvironment(this, 'MyCfnEnvironment', {
  name: 'name',

  // the properties below are optional
  airflowConfigurationOptions: airflowConfigurationOptions,
  airflowVersion: 'airflowVersion',
  dagS3Path: 'dagS3Path',
  endpointManagement: 'endpointManagement',
  environmentClass: 'environmentClass',
  executionRoleArn: 'executionRoleArn',
  kmsKey: 'kmsKey',
  loggingConfiguration: {
    dagProcessingLogs: {
      cloudWatchLogGroupArn: 'cloudWatchLogGroupArn',
      enabled: false,
      logLevel: 'logLevel',
    },
    schedulerLogs: {
      cloudWatchLogGroupArn: 'cloudWatchLogGroupArn',
      enabled: false,
      logLevel: 'logLevel',
    },
    taskLogs: {
      cloudWatchLogGroupArn: 'cloudWatchLogGroupArn',
      enabled: false,
      logLevel: 'logLevel',
    },
    webserverLogs: {
      cloudWatchLogGroupArn: 'cloudWatchLogGroupArn',
      enabled: false,
      logLevel: 'logLevel',
    },
    workerLogs: {
      cloudWatchLogGroupArn: 'cloudWatchLogGroupArn',
      enabled: false,
      logLevel: 'logLevel',
    },
  },
  maxWebservers: 123,
  maxWorkers: 123,
  minWebservers: 123,
  minWorkers: 123,
  networkConfiguration: {
    securityGroupIds: ['securityGroupIds'],
    subnetIds: ['subnetIds'],
  },
  pluginsS3ObjectVersion: 'pluginsS3ObjectVersion',
  pluginsS3Path: 'pluginsS3Path',
  requirementsS3ObjectVersion: 'requirementsS3ObjectVersion',
  requirementsS3Path: 'requirementsS3Path',
  schedulers: 123,
  sourceBucketArn: 'sourceBucketArn',
  startupScriptS3ObjectVersion: 'startupScriptS3ObjectVersion',
  startupScriptS3Path: 'startupScriptS3Path',
  tags: tags,
  webserverAccessMode: 'webserverAccessMode',
  weeklyMaintenanceWindowStart: 'weeklyMaintenanceWindowStart',
  workerReplacementStrategy: 'workerReplacementStrategy',
});
```

## Initializer

```ts
new CfnEnvironment(scope: Construct, id: string, props: CfnEnvironmentProps)
```

## Construct Props

- `airflowConfigurationOptions`: any — A list of key-value pairs containing the Airflow configuration options for your environment.

  For example, `core.default_timezone: utc` . To learn more, see [Apache Airflow configuration options](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html) .

- `airflowVersion`: string — The version of Apache Airflow to use for the environment.

  If no value is specified, defaults to the latest version.

  If you specify a newer version number for an existing environment, the version update requires some service interruption before taking effect.

  *Allowed Values* : `2.7.2` | `2.8.1` | `2.9.2` | `2.10.1` | `2.10.3` | `3.0.6` (latest)

- `dagS3Path`: string — The relative path to the DAGs folder on your Amazon S3 bucket.

  For example, `dags` . To learn more, see [Adding or updating DAGs](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html) .

- `endpointManagement`: string — Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA.

  If set to `SERVICE` , Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to `CUSTOMER` , you must create, and manage, the VPC endpoints in your VPC.

- `environmentClass`: string — The environment class type.

  Valid values: `mw1.micro` , `mw1.small` , `mw1.medium` , `mw1.large` , `mw1.1large` , and `mw1.2large` . To learn more, see [Amazon MWAA environment class](https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html) .

- `executionRoleArn`: string | [IRoleRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html) — The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.

  For example, `arn:aws:iam::123456789:role/my-execution-role` . To learn more, see [Amazon MWAA Execution role](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html) .

- `kmsKey`: string | [IKeyRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_kms.IKeyRef.html) — The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.

  You can use an AWS KMS key managed by MWAA, or a customer-managed KMS key (advanced).

- `loggingConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnEnvironment.LoggingConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_mwaa.CfnEnvironment.LoggingConfigurationProperty.html) — The Apache Airflow logs being sent to CloudWatch Logs: `DagProcessingLogs` , `SchedulerLogs` , `TaskLogs` , `WebserverLogs` , `WorkerLogs` .

- `maxWebservers`: number — The maximum number of web servers that you want to run in your environment.

  Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for `MaxWebservers` when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set in `MaxWebserers` . As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in `MinxWebserers` .

  Valid values: For environments larger than mw1.micro, accepts values from `2` to `5` . Defaults to `2` for all environment sizes except mw1.micro, which defaults to `1` .

- `maxWorkers`: number — The maximum number of workers that you want to run in your environment.

  MWAA scales the number of Apache Airflow workers up to the number you specify in the `MaxWorkers` field. For example, `20` . When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in `MinWorkers` .

- `minWebservers`: number — The minimum number of web servers that you want to run in your environment.

  Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for `MaxWebservers` when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set in `MinxWebserers` .

  Valid values: For environments larger than mw1.micro, accepts values from `2` to `5` . Defaults to `2` for all environment sizes except mw1.micro, which defaults to `1` .

- `minWorkers`: number — The minimum number of workers that you want to run in your environment.

  MWAA scales the number of Apache Airflow workers up to the number you specify in the `MaxWorkers` field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in the `MinWorkers` field. For example, `2` .

- `name`: string (required) — The name of your Amazon MWAA environment.

- `networkConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnEnvironment.NetworkConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_mwaa.CfnEnvironment.NetworkConfigurationProperty.html) — The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.

  To learn more, see [About networking on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html) .

- `pluginsS3ObjectVersion`: string — The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see [Installing custom plugins](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html) .

- `pluginsS3Path`: string — The relative path to the `plugins.zip` file on your Amazon S3 bucket. For example, `plugins.zip` . To learn more, see [Installing custom plugins](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html) .

- `requirementsS3ObjectVersion`: string — The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see [Installing Python dependencies](https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html) .

- `requirementsS3Path`: string — The relative path to the `requirements.txt` file on your Amazon S3 bucket. For example, `requirements.txt` . To learn more, see [Installing Python dependencies](https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html) .

- `schedulers`: number — The number of schedulers that you want to run in your environment. Valid values:.

  - *v2* - For environments larger than mw1.micro, accepts values from 2 to 5. Defaults to 2 for all environment sizes except mw1.micro, which defaults to 1.
  - *v1* - Accepts 1.

- `sourceBucketArn`: string | [IBucketRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_s3.IBucketRef.html) — The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.

  For example, `arn:aws:s3:::my-airflow-bucket-unique-name` . To learn more, see [Create an Amazon S3 bucket for Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html) .

- `startupScriptS3ObjectVersion`: string — The version of the startup shell script in your Amazon S3 bucket.

  You must specify the [version ID](https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html) that Amazon S3 assigns to the file every time you update the script.

  Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:

  `3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo`

  For more information, see [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html) .

- `startupScriptS3Path`: string — The relative path to the startup shell script in your Amazon S3 bucket. For example, `s3://mwaa-environment/startup.sh` .

  Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, see [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html) .

- `tags`: any — The key-value tag pairs associated to your environment. For example, `"Environment": "Staging"` . To learn more, see [Tagging](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) .

  If you specify new tags for an existing environment, the update requires service interruption before taking effect.

- `webserverAccessMode`: string — The Apache Airflow *Web server* access mode.

  To learn more, see [Apache Airflow access modes](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html) . Valid values: `PRIVATE_ONLY` or `PUBLIC_ONLY` .

- `weeklyMaintenanceWindowStart`: string — The day and time of the week to start weekly maintenance updates of your environment in the following format: `DAY:HH:MM` .

  For example: `TUE:03:30` . You can specify a start time in 30 minute increments only. Supported input includes the following:

  - MON|TUE|WED|THU|FRI|SAT|SUN:([01]\\d|2[0-3]):(00|30)

- `workerReplacementStrategy`: string — The worker replacement strategy to use when updating the environment.

  Valid values: `FORCED`, `GRACEFUL`. FORCED means Apache Airflow workers will be stopped and replaced without waiting for tasks to complete before an update. GRACEFUL means Apache Airflow workers will be able to complete running tasks for up to 12 hours during an update before being stopped and replaced.

## Properties

- `airflowConfigurationOptions`: any — A list of key-value pairs containing the Airflow configuration options for your environment.

- `airflowVersion`: string — The version of Apache Airflow to use for the environment.

- `attrArn`: string — The ARN for the Amazon MWAA environment.

- `attrCeleryExecutorQueue`: string — The queue ARN for the environment's [Celery Executor](https://docs.aws.amazon.com/https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/celery.html) . Amazon MWAA uses a Celery Executor to distribute tasks across multiple workers. When you create an environment in a shared VPC, you must provide access to the Celery Executor queue from your VPC.

- `attrDatabaseVpcEndpointService`: string — The VPC endpoint for the environment's Amazon RDS database.

- `attrLoggingConfigurationDagProcessingLogsCloudWatchLogGroupArn`: string — The ARN for the CloudWatch Logs group where the Apache Airflow DAG processing logs are published.

- `attrLoggingConfigurationSchedulerLogsCloudWatchLogGroupArn`: string — The ARN for the CloudWatch Logs group where the Apache Airflow Scheduler logs are published.

- `attrLoggingConfigurationTaskLogsCloudWatchLogGroupArn`: string — The ARN for the CloudWatch Logs group where the Apache Airflow task logs are published.

- `attrLoggingConfigurationWebserverLogsCloudWatchLogGroupArn`: string — The ARN for the CloudWatch Logs group where the Apache Airflow Web server logs are published.

- `attrLoggingConfigurationWorkerLogsCloudWatchLogGroupArn`: string — The ARN for the CloudWatch Logs group where the Apache Airflow Worker logs are published.

- `attrWebserverUrl`: string — The URL of your Apache Airflow UI.

- `attrWebserverVpcEndpointService`: string — The VPC endpoint for the environment's web server.

- `CFN_RESOURCE_TYPE_NAME`: string (static) — The CloudFormation resource type name for this resource class.

- `cfnOptions`: [ICfnResourceOptions](/cdk/api/v2/docs/aws-cdk-lib.ICfnResourceOptions.html) — Options for this resource, such as condition, update policy etc.

- `cfnResourceType`: string — AWS resource type.

- `creationStack`: string[]

- `dagS3Path`: string — The relative path to the DAGs folder on your Amazon S3 bucket.

- `endpointManagement`: string — Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html)

- `environmentClass`: string — The environment class type.

- `environmentRef`: [EnvironmentReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_mwaa.EnvironmentReference.html) — A reference to a Environment resource.

- `executionRoleArn`: string — The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment.

- `kmsKey`: string — The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment.

- `loggingConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnEnvironment.LoggingConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_mwaa.CfnEnvironment.LoggingConfigurationProperty.html) — The Apache Airflow logs being sent to CloudWatch Logs: `DagProcessingLogs` , `SchedulerLogs` , `TaskLogs` , `WebserverLogs` , `WorkerLogs` .

- `logicalId`: string — The logical ID for this CloudFormation stack element.

  The logical ID of the element
  is calculated from the path of the resource node in the construct tree.

  To override this value, use `overrideLogicalId(newLogicalId)`.

- `maxWebservers`: number — The maximum number of web servers that you want to run in your environment.

- `maxWorkers`: number — The maximum number of workers that you want to run in your environment.

- `minWebservers`: number — The minimum number of web servers that you want to run in your environment.

- `minWorkers`: number — The minimum number of workers that you want to run in your environment.

- `name`: string — The name of your Amazon MWAA environment.

- `networkConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnEnvironment.NetworkConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_mwaa.CfnEnvironment.NetworkConfigurationProperty.html) — The VPC networking components used to secure and enable network traffic between the AWS resources for your environment.

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

- `pluginsS3ObjectVersion`: string — The version of the plugins.zip file on your Amazon S3 bucket. To learn more, see [Installing custom plugins](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html) .

- `pluginsS3Path`: string — The relative path to the `plugins.zip` file on your Amazon S3 bucket. For example, `plugins.zip` . To learn more, see [Installing custom plugins](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html) .

- `ref`: string — Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

  If, by any chance, the intrinsic reference of a resource is not a string, you could
  coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.

- `requirementsS3ObjectVersion`: string — The version of the requirements.txt file on your Amazon S3 bucket. To learn more, see [Installing Python dependencies](https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html) .

- `requirementsS3Path`: string — The relative path to the `requirements.txt` file on your Amazon S3 bucket. For example, `requirements.txt` . To learn more, see [Installing Python dependencies](https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html) .

- `schedulers`: number — The number of schedulers that you want to run in your environment.

  Valid values:.

- `sourceBucketArn`: string — The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored.

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

  CfnElements must be defined within a stack scope (directly or indirectly).

- `startupScriptS3ObjectVersion`: string — The version of the startup shell script in your Amazon S3 bucket.

- `startupScriptS3Path`: string — The relative path to the startup shell script in your Amazon S3 bucket.

  For example, `s3://mwaa-environment/startup.sh` .

- `tags`: [TagManager](/cdk/api/v2/docs/aws-cdk-lib.TagManager.html) — Tag Manager which manages the tags for this resource.

- `tagsRaw`: any — The key-value tag pairs associated to your environment.

  For example, `"Environment": "Staging"` . To learn more, see [Tagging](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) .

- `webserverAccessMode`: string — The Apache Airflow *Web server* access mode.

- `weeklyMaintenanceWindowStart`: string — The day and time of the week to start weekly maintenance updates of your environment in the following format: `DAY:HH:MM` .

- `workerReplacementStrategy`: string — The worker replacement strategy to use when updating the environment.

## Methods

- `addDeletionOverride(path: string): void` — Syntactic sugar for `addOverride(path, undefined)`.

  **Parameters**

  - `path` — The path of the value to delete.

- `addDependency(target: CfnResource): void` — Use `addResourceDependency` instead.

  This method has been renamed to `addResourceDependency` to more clearly
  set it apart from `construct.node.addDependency`. See the documentation
  of that function for more details.

- `addDependsOn(target: CfnResource): void` — Use `addResourceDependency` instead.

  This can be used for resources across stacks (or nested stack) boundaries
  and the dependency will automatically be transferred to the relevant scope.

  This method has been renamed to `addResourceDependency`, which makes it
  more clear that this method operates at a different level from the
  construct-level `construct.node.addDependency()` mechanism.

- `addMetadata(key: string, value: any): void` — Add a value to the CloudFormation Resource Metadata.

- `addOverride(path: string, value: any): void` — Adds an override to the synthesized CloudFormation resource.

  To add a
  property override, either use `addPropertyOverride` or prefix `path` with
  "Properties." (i.e. `Properties.TopicName`).

  If the override is nested, separate each nested level using a dot (.) in the path parameter.
  If there is an array as part of the nesting, specify the index in the path.

  To include a literal `.` in the property name, prefix with a `\`. In most
  programming languages you will need to write this as `"\\."` because the
  `\` itself will need to be escaped.

  For example,
  ```typescript
  cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
  cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
  ```
  would add the overrides
  ```json
  "Properties": {
    "GlobalSecondaryIndexes": [
      {
        "Projection": {
          "NonKeyAttributes": [ "myattribute" ]
          ...
        }
        ...
      },
      {
        "ProjectionType": "INCLUDE"
        ...
      },
    ]
    ...
  }
  ```

  The `value` argument to `addOverride` will not be processed or translated
  in any way. Pass raw JSON values in here with the correct capitalization
  for CloudFormation. If you pass CDK classes or structs, they will be
  rendered with lowercased key names, and CloudFormation will reject the
  template.

  **Parameters**

  - `path` — - The path of the property, you can use dot notation to override values in complex types.
  - `value` — - The value.

- `addPropertyDeletionOverride(propertyPath: string): void` — Adds an override that deletes the value of a property from the resource definition.

  **Parameters**

  - `propertyPath` — The path to the property.

- `addPropertyOverride(propertyPath: string, value: any): void` — Adds an override to a resource property.

  Syntactic sugar for `addOverride("Properties.<...>", value)`.

  **Parameters**

  - `propertyPath` — The path of the property.
  - `value` — The value.

- `addResourceDependency(target: CfnResource, reason?: string): void` — Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

  This can be used for resources across stacks (or nested stack) boundaries
  and the dependency will automatically be transferred to the relevant scope.

  This method only adds dependencies between L1 resources. If you are
  looking for a generic construct-to-construct dependency mechanism that works
  for all constructs including L2s, use `construct.node.addDependency` instead.

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

  When set, any cross-stack reference to this resource will use the specified
  strength instead of the global default from the consuming stack's context.

  **Parameters**

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

- `applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void` — Sets the deletion policy of the resource based on the removal policy specified.

  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`). In some
  cases, a snapshot can be taken of the resource prior to deletion
  (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
  can be found in the following link:

- `arnForEnvironment(resource: IEnvironmentRef): string` (static)

- `cfnPropertyName(cdkPropertyName: string): string`

- `fromEnvironmentArn(scope: Construct, id: string, arn: string): IEnvironmentRef` (static) — Creates a new IEnvironmentRef from an ARN.

- `fromEnvironmentName(scope: Construct, id: string, environmentName: string): IEnvironmentRef` (static) — Creates a new IEnvironmentRef from a environmentName.

- `getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference` — Returns a token for an runtime attribute of this resource.

  Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
  in case there is no generated attribute.

  **Parameters**

  - `attributeName` — The name of the attribute.

- `getMetadata(key: string): any` — Retrieve a value value from the CloudFormation Resource Metadata.

- `inspect(inspector: TreeInspector): void` — Examines the CloudFormation resource and discloses attributes.

  **Parameters**

  - `inspector` — tree inspector to collect and process attributes.

- `isCfnElement(x: any): boolean` (static) — Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

  Uses duck-typing instead of `instanceof` to allow stack elements from different
  versions of this library to be included in the same stack.

  **Returns:** The construct as a stack element or undefined if it is not a stack element.

- `isCfnEnvironment(x: any): boolean` (static) — Checks whether the given object is a CfnEnvironment.

- `isCfnResource(x: any): boolean` (static) — Check whether the given object is a CfnResource.

- `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`.

- `obtainDependencies(): Stack | CfnResource[]` — Retrieves an array of resources and stacks this resource depends on.

  For resources depended on directly, returns the `CfnResource` object. For
  dependencies on other stacks, returns the `Stack` object. The order of the
  array is not guaranteed.

- `overrideLogicalId(newLogicalId: string): void` — Overrides the auto-generated logical ID with a specific ID.

  **Parameters**

  - `newLogicalId` — The new logical ID to use for this stack element.

- `removeDependency(target: CfnResource): void` — Use `removeResourceDependency` instead

  This can be used for resources across stacks (including nested stacks)
  and the dependency will automatically be removed from the relevant scope.

- `removeResourceDependency(target: CfnResource): void` — Indicates that this resource no longer depends on another resource.

  This can be used for resources across stacks (including nested stacks)
  and the dependency will automatically be removed from the relevant scope.

- `replaceDependency(target: CfnResource, newTarget: CfnResource): void` — Replaces one dependency with another.

  **Parameters**

  - `target` — The dependency to replace.
  - `newTarget` — The new dependency to add.

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

  **Returns:** a string representation of this resource

- `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.
