# ResourceEnvironment

Represents the environment a given resource lives in.

Used as the return value for the `IEnvironmentAware.env` property.

- Source: [`interfaces/environment-aware.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/interfaces/environment-aware.ts#L24)
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { interfaces } from 'aws-cdk-lib';
const resourceEnvironment: interfaces.ResourceEnvironment = {
  account: 'account',
  region: 'region',
};
```

## Properties

- `account`: string (required) — The AWS Account ID that this resource belongs to.

  Since this can be a Token (for example, when the account is
  CloudFormation's `AWS::AccountId` intrinsic), make sure to use
  `Token.compareStrings()` instead of comparing the values with direct
  string equality.

- `region`: string (required) — The AWS Region that this resource belongs to.

  Since this can be a Token (for example, when the region is CloudFormation's
  `AWS::Region` intrinsic), make sure to use `Token.compareStrings()` instead
  of comparing the values with direct string equality.
