Skip to content

Instantly share code, notes, and snippets.

@jsamuel1
Created February 22, 2024 09:50
Show Gist options
  • Save jsamuel1/26a5d1d1dac1343cc794288c9f04162a to your computer and use it in GitHub Desktop.
Save jsamuel1/26a5d1d1dac1343cc794288c9f04162a to your computer and use it in GitHub Desktop.
CDK Create role for EKS Pod Identities
const podIdentityRole = new Role(this, 'PodIdentityRole',
{
assumedBy: new SessionTagsPrincipal(new ServicePrincipal('pods.eks.amazonaws.com')),
managedPolicies: [
ManagedPolicy.fromAwsManagedPolicyName('AmazonEC2ContainerRegistryReadOnly'),
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment