# FargateProfileProps

Configuration props for EKS Fargate Profiles.

Extends: FargateProfileProps
Extends: FargateProfileOptions
Used as props by: FargateProfile

- Source: [`aws-eks/lib/fargate-profile.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-eks/lib/fargate-profile.ts#L81)

## Example

```ts
declare const cluster: eks.Cluster;
new eks.FargateProfile(this, 'MyProfile', {
  cluster,
  selectors: [ { namespace: 'default' } ],
});
```

## Properties

- `cluster`: [Cluster](/cdk/api/v2/docs/aws-cdk-lib.aws_eks.Cluster.html) (required) — The EKS cluster to apply the Fargate profile to.

  [disable-awslint:ref-via-interface]

- `fargateProfileName`: string = generated — The name of the Fargate profile.

- `podExecutionRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The pod execution role to use for pods that match the selectors in the Fargate profile.

  **Default:** a role will be automatically created

  The pod execution role allows Fargate infrastructure to
  register with your cluster as a node, and it provides read access to Amazon
  ECR image repositories.

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.DESTROY — The removal policy applied to the custom resource that manages the Fargate profile.

  The removal policy controls what happens to the resource if it stops being managed by CloudFormation.
  This can happen in one of three situations:

  - The resource is removed from the template, so CloudFormation stops managing it
  - A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
  - The stack is deleted, so CloudFormation stops managing all resources in it

- `selectors`: [Selector](/cdk/api/v2/docs/aws-cdk-lib.aws_eks.Selector.html)[] (required) — The selectors to match for pods to use this Fargate profile.

  Each selector
  must have an associated namespace. Optionally, you can also specify labels
  for a namespace.

  At least one selector is required and you may specify up to five selectors.

- `subnetSelection`: [SubnetSelection](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) — Select which subnets to launch your pods into.

  **Default:** all private subnets of the VPC are selected.

  At this time, pods running
  on Fargate are not assigned public IP addresses, so only private subnets
  (with no direct route to an Internet Gateway) are allowed.

  You must specify the VPC to customize the subnet selection

- `vpc`: [IVpc](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) — The VPC from which to select subnets to launch your pods into.

  **Default:** all private subnets used by the EKS cluster

  By default, all private subnets are selected. You can customize this using
  `subnetSelection`.
