Skip to content

Instantly share code, notes, and snippets.

@alisade
Last active November 24, 2019 02:39
Show Gist options
  • Save alisade/45391831272a35f2e6ae83d3ce2c8980 to your computer and use it in GitHub Desktop.
Save alisade/45391831272a35f2e6ae83d3ce2c8980 to your computer and use it in GitHub Desktop.
instance profile for eks worker nodes
AWSTemplateFormatVersion: "2010-09-09"
Description: Amazon EKS - Node Group Role
Resources:
NodeInstanceRole:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Service:
- ec2.amazonaws.com
Action:
- "sts:AssumeRole"
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy"
- "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy"
- "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
Path: /
NodeInstanceProfile:
Type: AWS::IAM::InstanceProfile
Properties:
Roles:
- !Ref NodeInstanceRole
Outputs:
NodeInstanceProfile:
Description: The node instance profile
Value: !GetAtt NodeInstanceProfile.Arn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment