

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::EKS::AccessEntry
<a name="aws-resource-eks-accessentry"></a>

Creates an access entry.

An access entry allows an IAM principal to access your cluster. Access entries can replace the need to maintain entries in the `aws-auth``ConfigMap` for authentication. You have the following options for authorizing an IAM principal to access Kubernetes objects on your cluster: Kubernetes role-based access control (RBAC), Amazon EKS, or both. Kubernetes RBAC authorization requires you to create and manage Kubernetes `Role`, `ClusterRole`, `RoleBinding`, and `ClusterRoleBinding` objects, in addition to managing access entries. If you use Amazon EKS authorization exclusively, you don't need to create and manage Kubernetes `Role`, `ClusterRole`, `RoleBinding`, and `ClusterRoleBinding` objects.

For more information about access entries, see [Access entries](https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html) in the *Amazon EKS User Guide*.

## Syntax
<a name="aws-resource-eks-accessentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-eks-accessentry-syntax.json"></a>

```
{
  "Type" : "AWS::EKS::AccessEntry",
  "Properties" : {
      "[AccessPolicies](#cfn-eks-accessentry-accesspolicies)" : [ AccessPolicy, ... ],
      "[ClusterName](#cfn-eks-accessentry-clustername)" : String,
      "[KubernetesGroups](#cfn-eks-accessentry-kubernetesgroups)" : [ String, ... ],
      "[PrincipalArn](#cfn-eks-accessentry-principalarn)" : String,
      "[Tags](#cfn-eks-accessentry-tags)" : [ Tag, ... ],
      "[Type](#cfn-eks-accessentry-type)" : String,
      "[Username](#cfn-eks-accessentry-username)" : String
    }
}
```

### YAML
<a name="aws-resource-eks-accessentry-syntax.yaml"></a>

```
Type: AWS::EKS::AccessEntry
Properties:
  [AccessPolicies](#cfn-eks-accessentry-accesspolicies): 
    - AccessPolicy
  [ClusterName](#cfn-eks-accessentry-clustername): String
  [KubernetesGroups](#cfn-eks-accessentry-kubernetesgroups): 
    - String
  [PrincipalArn](#cfn-eks-accessentry-principalarn): String
  [Tags](#cfn-eks-accessentry-tags): 
    - Tag
  [Type](#cfn-eks-accessentry-type): String
  [Username](#cfn-eks-accessentry-username): String
```

## Properties
<a name="aws-resource-eks-accessentry-properties"></a>

`AccessPolicies`  <a name="cfn-eks-accessentry-accesspolicies"></a>
The access policies to associate to the access entry.  
*Required*: No  
*Type*: Array of [AccessPolicy](aws-properties-eks-accessentry-accesspolicy.md)  
*Maximum*: `20`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClusterName`  <a name="cfn-eks-accessentry-clustername"></a>
The name of your cluster.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`KubernetesGroups`  <a name="cfn-eks-accessentry-kubernetesgroups"></a>
The value for `name` that you've specified for `kind: Group` as a `subject` in a Kubernetes `RoleBinding` or `ClusterRoleBinding` object. Amazon EKS doesn't confirm that the value for `name` exists in any bindings on your cluster. You can specify one or more names.  
Kubernetes authorizes the `principalArn` of the access entry to access any cluster objects that you've specified in a Kubernetes `Role` or `ClusterRole` object that is also specified in a binding's `roleRef`. For more information about creating Kubernetes `RoleBinding`, `ClusterRoleBinding`, `Role`, or `ClusterRole` objects, see [Using RBAC Authorization in the Kubernetes documentation](https://kubernetes.io/docs/reference/access-authn-authz/rbac/).  
If you want Amazon EKS to authorize the `principalArn` (instead of, or in addition to Kubernetes authorizing the `principalArn`), you can associate one or more access policies to the access entry using `AssociateAccessPolicy`. If you associate any access policies, the `principalARN` has all permissions assigned in the associated access policies and all permissions in any Kubernetes `Role` or `ClusterRole` objects that the group names are bound to.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PrincipalArn`  <a name="cfn-eks-accessentry-principalarn"></a>
The ARN of the IAM principal for the `AccessEntry`. You can specify one ARN for each access entry. You can't specify the same ARN in more than one access entry. This value can't be changed after access entry creation.  
The valid principals differ depending on the type of the access entry in the `type` field. For `STANDARD` access entries, you can use every IAM principal type. For nodes (`EC2` (for EKS Auto Mode), `EC2_LINUX`, `EC2_WINDOWS`, `FARGATE_LINUX`, and `HYBRID_LINUX`), the only valid ARN is IAM roles. You can't use the STS session principal type with access entries because this is a temporary principal for each session and not a permanent identity that can be assigned permissions.  
[IAM best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp) recommend using IAM roles with temporary credentials, rather than IAM users with long-term credentials.   
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-eks-accessentry-tags"></a>
Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or AWS resources.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-eks-accessentry-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-eks-accessentry-type"></a>
The type of the new access entry. Valid values are `STANDARD`, `FARGATE_LINUX`, `EC2_LINUX`, `EC2_WINDOWS`, `EC2` (for EKS Auto Mode), `HYBRID_LINUX`, and `HYPERPOD_LINUX`.   
If the `principalArn` is for an IAM role that's used for self-managed Amazon EC2 nodes, specify `EC2_LINUX` or `EC2_WINDOWS`. Amazon EKS grants the necessary permissions to the node for you. If the `principalArn` is for any other purpose, specify `STANDARD`. If you don't specify a value, Amazon EKS sets the value to `STANDARD`. If you have the access mode of the cluster set to `API_AND_CONFIG_MAP`, it's unnecessary to create access entries for IAM roles used with Fargate profiles or managed Amazon EC2 nodes, because Amazon EKS creates entries in the `aws-auth``ConfigMap` for the roles. You can't change this value once you've created the access entry.  
If you set the value to `EC2_LINUX` or `EC2_WINDOWS`, you can't specify values for `kubernetesGroups`, or associate an `AccessPolicy` to the access entry.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Username`  <a name="cfn-eks-accessentry-username"></a>
The username to authenticate to Kubernetes with. We recommend not specifying a username and letting Amazon EKS specify it for you. For more information about the value Amazon EKS specifies for you, or constraints before specifying your own username, see [Creating access entries](https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html#creating-access-entries) in the *Amazon EKS User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-eks-accessentry-return-values"></a>

### Ref
<a name="aws-resource-eks-accessentry-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name. For example:

 `{ "Ref": "arn:aws:iam::012345678910:role/my-role" }` 

For the access entry `arn:aws:iam::012345678910:role/my-role`, `Ref` returns the ARN of the access entry.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-eks-accessentry-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-eks-accessentry-return-values-fn--getatt-fn--getatt"></a>

`AccessEntryArn`  <a name="AccessEntryArn-fn::getatt"></a>
The ARN of the access entry.

## Examples
<a name="aws-resource-eks-accessentry--examples"></a>

### Create an access entry
<a name="aws-resource-eks-accessentry--examples--Create_an_access_entry"></a>

The following example creates an access entry of type `STANDARD` for an IAM role named `my-role`. The role has administrator permissions for all resources in the namespace named `my-namespace` and edit permissions for all resources on the cluster.

#### JSON
<a name="aws-resource-eks-accessentry--examples--Create_an_access_entry--json"></a>

```
{
    "myAccessEntry": {
        "Type" : "AWS::EKS::AccessEntry",
        "Properties" : {
            "ClusterName": "my-cluster",
            "PrincipalArn": "arn:aws:iam::012345678910:role/my-role",
            "Username": "admin",
            "KubernetesGroups": ["my-group1", "my-group2"],
            "AccessPolicies": [
                {
                    "PolicyArn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy",
                    "AccessScope": {
                        "Type": "namespace",
                        "Namespaces": ["my-namespace"]
                    }
                },
                {
                    "PolicyArn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy",
                    "AccessScope": {
                        "Type": "cluster"
                    }
                }
            ],
            "Type": "STANDARD",
            "Tags" : [
                {
                    "Key": "my-tagkey",
                    "Value": "my-tagvalue"
                }
            ]
        } 
    }
}
```

#### YAML
<a name="aws-resource-eks-accessentry--examples--Create_an_access_entry--yaml"></a>

```
MyAccessEntry:
    Type: 'AWS::EKS::AccessEntry'
    Properties:
        ClusterName: 'my-cluster'
        PrincipalArn: 'arn:aws:iam::012345678910:role/my-role'
        Username: 'admin'
        KubernetesGroups:
            - 'my-group1'
            - 'my-group2'
        AccessPolicies:
            - PolicyArn: 'arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy'
              AccessScope:
                Type: 'namespace'
                Namespaces:
                    - 'my-namespace'
            - PolicyArn: 'arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy'
              AccessScope:
                Type: 'cluster'
        Type: 'STANDARD'
        Tags:
            - Key: 'my-tagkey'
              Value: 'my-tagvalue'
```

## See also
<a name="aws-resource-eks-accessentry--seealso"></a>
+ [Access entries](https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html) in the *Amazon EKS User Guide *.
+ [https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAccessEntry.html](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAccessEntry.html) in the *Amazon EKS API Reference*.

# AWS::EKS::AccessEntry AccessPolicy
<a name="aws-properties-eks-accessentry-accesspolicy"></a>

An access policy includes permissions that allow Amazon EKS to authorize an IAM principal to work with Kubernetes objects on your cluster. The policies are managed by Amazon EKS, but they're not IAM policies. You can't view the permissions in the policies using the API. The permissions for many of the policies are similar to the Kubernetes `cluster-admin`, `admin`, `edit`, and `view` cluster roles. For more information about these cluster roles, see [User-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) in the Kubernetes documentation. To view the contents of the policies, see [Access policy permissions](https://docs.aws.amazon.com/eks/latest/userguide/access-policies.html#access-policy-permissions) in the *Amazon EKS User Guide*.

## Syntax
<a name="aws-properties-eks-accessentry-accesspolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-eks-accessentry-accesspolicy-syntax.json"></a>

```
{
  "[AccessScope](#cfn-eks-accessentry-accesspolicy-accessscope)" : AccessScope,
  "[PolicyArn](#cfn-eks-accessentry-accesspolicy-policyarn)" : String
}
```

### YAML
<a name="aws-properties-eks-accessentry-accesspolicy-syntax.yaml"></a>

```
  [AccessScope](#cfn-eks-accessentry-accesspolicy-accessscope): 
    AccessScope
  [PolicyArn](#cfn-eks-accessentry-accesspolicy-policyarn): String
```

## Properties
<a name="aws-properties-eks-accessentry-accesspolicy-properties"></a>

`AccessScope`  <a name="cfn-eks-accessentry-accesspolicy-accessscope"></a>
The scope of an `AccessPolicy` that's associated to an `AccessEntry`.  
*Required*: Yes  
*Type*: [AccessScope](aws-properties-eks-accessentry-accessscope.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PolicyArn`  <a name="cfn-eks-accessentry-accesspolicy-policyarn"></a>
The ARN of the access policy.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::EKS::AccessEntry AccessScope
<a name="aws-properties-eks-accessentry-accessscope"></a>

The scope of an `AccessPolicy` that's associated to an `AccessEntry`.

## Syntax
<a name="aws-properties-eks-accessentry-accessscope-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-eks-accessentry-accessscope-syntax.json"></a>

```
{
  "[Namespaces](#cfn-eks-accessentry-accessscope-namespaces)" : [ String, ... ],
  "[Type](#cfn-eks-accessentry-accessscope-type)" : String
}
```

### YAML
<a name="aws-properties-eks-accessentry-accessscope-syntax.yaml"></a>

```
  [Namespaces](#cfn-eks-accessentry-accessscope-namespaces): 
    - String
  [Type](#cfn-eks-accessentry-accessscope-type): String
```

## Properties
<a name="aws-properties-eks-accessentry-accessscope-properties"></a>

`Namespaces`  <a name="cfn-eks-accessentry-accessscope-namespaces"></a>
A Kubernetes `namespace` that an access policy is scoped to. A value is required if you specified `namespace` for `Type`.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-eks-accessentry-accessscope-type"></a>
The scope type of an access policy.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `namespace | cluster`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::EKS::AccessEntry Tag
<a name="aws-properties-eks-accessentry-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource – 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length – 128 Unicode characters in UTF-8
+ Maximum value length – 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

## Syntax
<a name="aws-properties-eks-accessentry-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-eks-accessentry-tag-syntax.json"></a>

```
{
  "[Key](#cfn-eks-accessentry-tag-key)" : String,
  "[Value](#cfn-eks-accessentry-tag-value)" : String
}
```

### YAML
<a name="aws-properties-eks-accessentry-tag-syntax.yaml"></a>

```
  [Key](#cfn-eks-accessentry-tag-key): String
  [Value](#cfn-eks-accessentry-tag-value): String
```

## Properties
<a name="aws-properties-eks-accessentry-tag-properties"></a>

`Key`  <a name="cfn-eks-accessentry-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-eks-accessentry-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)