Skip to main content

IAM

Depending on how you want to use Mission Control you need to create an IAM role for mission control to use:

Use CaseRole
Read Only Scrapingarn:aws:iam::aws:policy/ReadOnlyAccess
Playbooks to create and update AWS Resourcesarn:aws:iam::aws:policy/PowerUserAccess
Create new IAM Policy (Alternative)

You can also create a new policy with just the permissions required by Mission Control

iam-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "mission-control-config-role",
"Effect": "Allow",
"Action": [
"acm:Describe*",
"acm:Get*",
"acm:List*",
"cloudtrail:LookupEvents",
"config:BatchGetAggregateResourceConfig",
"config:BatchGetResourceConfig",
"config:Describe*",
"config:Get*",
"config:List*",
"config:SelectAggregateResourceConfig",
"config:SelectResourceConfig",
"ec2:Describe*",
"ecr:Describe*",
"eks:Describe*",
"eks:ListClusters",
"elasticfilesystem:Describe*",
"elasticloadbalancing:Describe*",
"guardduty:Describe*",
"guardduty:Get*",
"guardduty:List*",
"iam:GetAccountName",
"iam:GetAccountSummary",
"iam:GetGroup",
"iam:GetGroupPolicy",
"iam:GetInstanceProfile",
"iam:GetLoginProfile",
"iam:GetPolicy",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:GetUser",
"iam:List*",
"lambda:List*",
"rds:Describe*",
"sts:GetCallerIdentity"
"trustedadvisor:Describe*",
"trustedadvisor:DownloadRisk",
"trustedadvisor:Get*",
"trustedadvisor:List*",
],
"Resource": "*"
}
]
}

Configure IAM Roles for Mission Control

  1. Ensure the AWS Pod Identity Agent is configured and running

  2. Create a mapping file for eksctl

    eksctl.yaml
    podIdentityAssociations:
    - namespace: mission-control
    serviceAccountName: mission-control-sa
    permissionPolicyARNs: arn:aws:iam::aws:policy/ReadOnlyAccess

    - namespace: mission-control
    serviceAccountName: config-db-sa
    permissionPolicyARNs: arn:aws:iam::aws:policy/ReadOnlyAccess

    - namespace: mission-control
    serviceAccountName: canary-checker-sa
    permissionPolicyARNs: arn:aws:iam::aws:policy/ReadOnlyAccess
    iam:
    # note withOIDC is not required for Pod Identity
    serviceAccounts:
    # used by mission control for notifications / playbooks
    - metadata:
    name: mission-control-sa
    namespace: mission-control
    attachPolicyARNs:
    - "arn:aws:iam::aws:policy/ReadOnlyAccess"
    # used for cloudwatch, S3 and other AWS health checks
    - metadata:
    name: canary-checker-sa
    namespace: mission-control
    attachPolicyARNs:
    - "arn:aws:iam::aws:policy/ReadOnlyAccess"
    # used to scrape resources, AWS CloudTrail and AWS Cost & Usage Reports
    - metadata:
    name: config-db-sa
    namespace: mission-control
    attachPolicyARNs:
    - "arn:aws:iam::aws:policy/ReadOnlyAccess"

    Using an existing IAM Role

    If you are using a pre-existing IAM role when creating a pod identity association, you must configure the role to trust the newly introduced EKS service principal (pods.eks.amazonaws.com)

    iam-trust-policy.json
    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Principal": {
    "Service": "pods.eks.amazonaws.com"
    },
    "Action": ["sts:AssumeRole", "sts:TagSession"]
    }
    ]
    }
  3. Apply the Pod Identities using eksctl

    eksctl create podidentityassociation  -c eksctl.yaml