AWS cli documentation change
Summary
Added examples for creating EKS Pod Identity associations with IAM roles and tags
Security assessment
The changes document security-related functionality for managing pod identity associations (IAM role binding for Kubernetes pods), but there's no evidence of addressing a specific vulnerability. The examples demonstrate proper security practices for granting AWS access to pods.
Diff
diff --git a/cli/latest/reference/eks/create-pod-identity-association.md b/cli/latest/reference/eks/create-pod-identity-association.md index 1dd052713..4945f5d6b 100644 --- a//cli/latest/reference/eks/create-pod-identity-association.md +++ b//cli/latest/reference/eks/create-pod-identity-association.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 @@ -276,0 +278,76 @@ 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 an EKS Pod Identity association in EKS cluster** + +The following `create-pod-identity-association` example creates an EKS Pod Identity association between a service account in the EKS cluster and an IAM role. + + + aws eks create-pod-identity-association \ + --cluster-name eks-customer \ + --namespace default \ + --service-account default \ + --role-arn arn:aws:iam::111122223333:role/my-role + + +Output: + + + { + "association": { + "clusterName": "eks-customer", + "namespace": "default", + "serviceAccount": "default", + "roleArn": "arn:aws:iam::111122223333:role/my-role", + "associationArn": "arn:aws:eks:us-west-2:111122223333:podidentityassociation/eks-customer/a-8mvwvh57cu74mgcst", + "associationId": "a-8mvwvh57cu74mgcst", + "tags": {}, + "createdAt": "2025-05-24T19:40:13.961000-05:00", + "modifiedAt": "2025-05-24T19:40:13.961000-05:00" + } + } + + +For more information, see [Learn how EKS Pod Identity grants pods access to AWS services](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html) in the _Amazon EKS User Guide_. + +**Example 2: To create an EKS Pod Identity association in EKS cluster with tags** + +The following `create-pod-identity-association` creates an EKS Pod Identity association between a service account and an IAM role in the EKS cluster with tags. + + + aws eks create-pod-identity-association \ + --cluster-name eks-customer \ + --namespace default \ + --service-account default \ + --role-arn arn:aws:iam::111122223333:role/my-role \ + --tags Key1=value1,Key2=value2 + + +Output: + + + { + "association": { + "clusterName": "eks-customer", + "namespace": "default", + "serviceAccount": "default", + "roleArn": "arn:aws:iam::111122223333:role/my-role", + "associationArn": "arn:aws:eks:us-west-2:111122223333:podidentityassociation/eks-customer/a-9njjin9gfghecgoda", + "associationId": "a-9njjin9gfghecgoda", + "tags": { + "Key2": "value2", + "Key1": "value1" + }, + "createdAt": "2025-05-24T19:52:14.135000-05:00", + "modifiedAt": "2025-05-24T19:52:14.135000-05:00" + } + } + + +For more information, see [Learn how EKS Pod Identity grants pods access to AWS services](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html) in the _Amazon EKS User Guide_. + @@ -371 +448 @@ association -> (structure) - * [AWS CLI 2.27.51 Command Reference](../../index.html) » + * [AWS CLI 2.27.54 Command Reference](../../index.html) »