Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] [customization] Create/delete role associations for EMR on EKS #9254

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

hssyoo
Copy link
Contributor

@hssyoo hssyoo commented Jan 24, 2025

Description

EKS Pod Identity requires users to create pod identity associations for cluster service accounts that the pod container is going to use with a configured job execution IAM role. This requires users to provide service account names and the IAM role arn. However, service account information is opaque in the EMR on EKS service so the --create-role-associations and --delete-role-associations customizations simplify management by resolving the correct service accounts based on the input cluster and role names.

Manual testing

Create an IAM role with the following assume role policy document:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "pods.eks.amazonaws.com"
            },
            "Action": [
                "sts:AssumeRole",
                "sts:TagSession"
            ]
        }
    ]
}

Create an EKS cluster.

Run the create command, replacing the my-cluster and my-role values:

aws emr-containers create-role-associations --cluster-name my-cluster --namespace default --role-name my-role

Run the delete command, replacing the my-cluster and my-role values:

aws emr-containers delete-role-associations --cluster-name my-cluster --namespace default --role-name my-role

…ounts and provided IAM role so it can be used in Amazon EMR on EKS with EKS pod identity.
@hssyoo hssyoo self-assigned this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant