# EmailIdentity

An email identity.

Extends: Construct › Resource › EmailIdentity
Implements: IResource, IEmailIdentity, IEnvironmentAware, IEmailIdentityRef, IConstruct, IDependable

- CloudFormation: [`AWS::SES::EmailIdentity`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-ses-emailidentity.html)
- L1 type: [`CfnEmailIdentity`](/cdk/api/v2/docs/aws-cdk-lib.aws_ses.CfnEmailIdentity.html)
- Source: [`aws-ses/lib/email-identity.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ses/lib/email-identity.ts#L397)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
import * as iam from 'aws-cdk-lib/aws-iam';
declare const user: iam.User;

const identity = new ses.EmailIdentity(this, 'Identity', {
  identity: ses.Identity.domain('cdk.dev'),
});

identity.grantSendEmail(user);
```

## Initializer

```ts
new EmailIdentity(scope: Construct, id: string, props: EmailIdentityProps)
```

## Construct Props

- `configurationSet`: [IConfigurationSetRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ses.IConfigurationSetRef.html) — The configuration set to associate with the email identity.

  **Default:** do not use a specific configuration set

- `dkimIdentity`: [DkimIdentity](/cdk/api/v2/docs/aws-cdk-lib.aws_ses.DkimIdentity.html) — The type of DKIM identity to use.

  **Default:** Easy DKIM with a key length of 2048-bit

- `dkimSigning`: boolean = true — Whether the messages that are sent from the identity are signed using DKIM.

- `feedbackForwarding`: boolean = true — Whether to receive email notifications when bounce or complaint events occur.

  These notifications are sent to the address that you specified in the `Return-Path`
  header of the original email.

  You're required to have a method of tracking bounces and complaints. If you haven't set
  up another mechanism for receiving bounce or complaint notifications (for example, by
  setting up an event destination), you receive an email notification when these events
  occur (even if this setting is disabled).

- `identity`: [Identity](/cdk/api/v2/docs/aws-cdk-lib.aws_ses.Identity.html) (required) — The email address or domain to verify.

- `mailFromBehaviorOnMxFailure`: [MailFromBehaviorOnMxFailure](/cdk/api/v2/docs/aws-cdk-lib.aws_ses.MailFromBehaviorOnMxFailure.html) — The action to take if the required MX record for the MAIL FROM domain isn't found when you send an email.

  **Default:** MailFromBehaviorOnMxFailure.USE_DEFAULT_VALUE

- `mailFromDomain`: string — The custom MAIL FROM domain that you want the verified identity to use.

  **Default:** use amazonses.com

  The MAIL FROM domain
  must meet the following criteria:
    - It has to be a subdomain of the verified identity
    - It can't be used to receive email
    - It can't be used in a "From" address if the MAIL FROM domain is a destination for feedback
      forwarding emails

## Properties

- `dkimDnsTokenName1`: string (required) — The host name for the first token that you have to add to the DNS configurationfor your domain.

- `dkimDnsTokenName2`: string (required) — The host name for the second token that you have to add to the DNS configuration for your domain.

- `dkimDnsTokenName3`: string (required) — The host name for the third token that you have to add to the DNS configuration for your domain.

- `dkimDnsTokenValue1`: string (required) — The record value for the first token that you have to add to the DNS configuration for your domain.

- `dkimDnsTokenValue2`: string (required) — The record value for the second token that you have to add to the DNS configuration for your domain.

- `dkimDnsTokenValue3`: string (required) — The record value for the third token that you have to add to the DNS configuration for your domain.

- `dkimRecords`: [DkimRecord](/cdk/api/v2/docs/aws-cdk-lib.aws_ses.DkimRecord.html)[] (required) — DKIM records for this identity.

- `emailIdentityArn`: string (required) — The ARN of the email identity.

- `emailIdentityName`: string (required) — The name of the email identity.

- `emailIdentityRef`: [EmailIdentityReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ses.EmailIdentityReference.html) (required) — A reference to a EmailIdentity resource.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) (required) — 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.

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

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

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

## Methods

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

- `fromEmailIdentityArn(scope: Construct, id: string, emailIdentityArn: string): IEmailIdentity` (static) — Import an email identity by ARN.

- `fromEmailIdentityName(scope: Construct, id: string, emailIdentityName: string): IEmailIdentity` (static) — Use an existing email identity.

- `grant(grantee: IGrantable, ...actions: string[]): Grant` — Adds an IAM policy statement associated with this email identity to an IAM principal's policy.

  [disable-awslint:no-grants]

  **Parameters**

  - `grantee` — the principal (no-op if undefined).
  - `actions` — the set of actions to allow.

- `grantSendEmail(grantee: IGrantable): Grant` — Permits an IAM principal the send email action.

  Actions: SendEmail, SendRawEmail.

  [disable-awslint:no-grants]

  **Parameters**

  - `grantee` — the principal to grant access to.

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

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