AWS cli documentation change
Summary
Added multiple examples for creating EKS access entries, including different types of access entries and their configurations
Security assessment
The examples demonstrate security-related access control configuration (managing principal access to EKS clusters) but do not indicate resolution of a specific security vulnerability. The documentation improves clarity around security features without addressing known weaknesses.
Diff
diff --git a/cli/latest/reference/eks/create-access-entry.md b/cli/latest/reference/eks/create-access-entry.md index 7330b4dac..31a093aa5 100644 --- a//cli/latest/reference/eks/create-access-entry.md +++ b//cli/latest/reference/eks/create-access-entry.md @@ -15 +15 @@ - * [AWS CLI 2.27.51 Command Reference](../../index.html) » + * [AWS CLI 2.27.54 Command Reference](../../index.html) » @@ -35,0 +36 @@ + * Examples @@ -267,0 +269,71 @@ Disable automatically prompt for CLI input parameters. +## Examples¶ + +### Note + +To use the following examples, you must have the AWS CLI installed and configured. See the [Getting started guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) in the _AWS CLI User Guide_ for more information. + +Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See [Using quotation marks with strings](https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-quoting-strings.html) in the _AWS CLI User Guide_ . + +**Example 1: To create the access entry for EKS cluster** + +The following `create-access-entry` example creates an access entry that allows an IAM principal to access the EKS cluster. + + + aws eks create-access-entry \ + --cluster-name eks-customer \ + --principal-arn arn:aws:iam::111122223333:user/eks-user + + +Output: + + + { + "accessEntry": { + "clusterName": "eks-customer", + "principalArn": "arn:aws:iam::111122223333:user/eks-user", + "kubernetesGroups": [], + "accessEntryArn": "arn:aws:eks:us-west-2:111122223333:access-entry/eks-customer/user/111122223333/eks-user/a1b2c3d4-5678-90ab-cdef-a6506e3d36p0", + "createdAt": "2025-04-14T22:45:48.097000-05:00", + "modifiedAt": "2025-04-14T22:45:48.097000-05:00", + "tags": {}, + "username": "arn:aws:iam::111122223333:user/eks-user", + "type": "STANDARD" + } + } + + +For more information, see [Create access entries](https://docs.aws.amazon.com/eks/latest/userguide/creating-access-entries.html) in the _Amazon EKS User Guide_. + +**Example 2: To create the access entry for EKS cluster by specifying the type of access entry** + +The following `create-access-entry` example creates an access entry of type `EC2_LINUX` in the EKS cluster. By default, a type `STANDARD` access entry is created. Apart from the default, if we specify any other access entry types, an IAM role ARN needs to be passed in the CLI. + + + aws eks create-access-entry \ + --cluster-name eks-customer \ + --principal-arn arn:aws:iam::111122223333:role/admin-test-ip \ + --type EC2_LINUX + + +Output: + + + { + "accessEntry": { + "clusterName": "eks-customer", + "principalArn": "arn:aws:iam::111122223333:role/admin-test-ip", + "kubernetesGroups": [ + "system:nodes" + ], + "accessEntryArn": "arn:aws:eks:us-west-2:111122223333:access-entry/eks-customer/role/111122223333/admin-test-ip/accb5418-f493-f390-3e6e-c3f19f725fcp", + "createdAt": "2025-05-06T19:42:45.453000-05:00", + "modifiedAt": "2025-05-06T19:42:45.453000-05:00", + "tags": {}, + "username": "system:node:{{EC2PrivateDNSName}}", + "type": "EC2_LINUX" + } + } + + +For more information, see [Create access entries](https://docs.aws.amazon.com/eks/latest/userguide/creating-access-entries.html) in the _Amazon EKS User Guide_. + @@ -330 +402 @@ accessEntry -> (structure) - * [AWS CLI 2.27.51 Command Reference](../../index.html) » + * [AWS CLI 2.27.54 Command Reference](../../index.html) »