Bootstrap IAM role
The following table describes each policy of the bootstrap IAM role,ClickHouseManagementRole.
| Policy | Permissions | Scope | Purpose |
|---|---|---|---|
BasePolicy (inline) | Get the identity of the caller. Read the service quotas and the AWS default service quotas. | All resources. Read only. | Health checks and quota checks before provisioning |
ClickHouse-IAM-Base-Policy | Read IAM roles, policies, and instance profiles. Pass roles to AWS services. Create service-linked roles. Create, tag, and delete the OpenID Connect (OIDC) provider of the cluster. | Read: all IAM roles and policies. Pass roles: only the BYOC role names (for example *-k8s-worker, *-karpenter-node, *-CH-S3-Role), and only to EKS, EKS Pod Identity, and EC2. Service-linked roles: only for EKS, EKS node groups, and VPC Lattice. OIDC provider: tag clickhouse-byoc=true, which the role can add to any OIDC provider. | Read IAM state. Give the BYOC roles to EKS and EC2. |
ClickHouse-IAM-Extended-Policy (optional, on by default) | Create, change, and delete IAM roles, policies, and instance profiles | Tag clickhouse-byoc=true, which the role can add to any role, policy, or instance profile. Not limited: removal of a role from an instance profile. | Create the additional roles (see the next section for details). You do not need it if you bring your own IAM roles. |
ClickHouse-S3-Policy | Create buckets. Read and set the bucket configuration: tags, lifecycle, encryption, ownership, public access block, and metrics. List the objects in a bucket. No object read or write. No bucket deletion. | Only buckets named *.*.aws.clickhouse.cloud-shared, *.*.aws.clickhouse.cloud-backup, and *.*.aws.clickhouse.cloud-monitoring | Manage buckets that store ClickHouse table data, backups, and monitoring data |
ClickHouse-EKS-Policy | Create, change, and delete EKS clusters, add-ons, node groups, and Pod Identity associations. Read all EKS resources. | Write: only resources whose names start with clickhouse-cloud-. Read: all EKS resources. | Manage the EKS cluster, its add-ons, and its node groups |
ClickHouse-EC2-Policy | Read EC2, Elastic Load Balancing, and Auto Scaling. Launch instances. Manage launch templates, network interfaces, security groups, Elastic IPs, and tags. Change instance, network interface, and volume attributes. | Security groups: tag clickhouse-byoc=true or aws:eks:cluster-name = clickhouse-cloud-*. Elastic IPs and tag changes: tag clickhouse-byoc=true, which the role can add to any resource. No scope: instances, launch templates, network interfaces, and volumes. | Manage the nodes and security groups that control network access to the cluster |
ClickHouse-VPCWrite-Policy (optional, on by default) | Create, change, and delete VPCs, subnets, NAT gateways, internet gateways, route tables, and VPC endpoints | Only resources with the tag clickhouse-byoc=true | The BYOC VPC. You do not need it if you bring your own VPC. |
ClickHouse-VPCPrivateLink-Policy | Create, change, and delete VPC endpoint services | Only resources with the tag clickhouse-byoc=true | AWS PrivateLink endpoints for your services |
ClickHouse-VPCLattice-Policy | Create, change, and delete VPC Lattice resource gateways and resource configurations, and AWS RAM resource shares. Read VPC Lattice and AWS RAM. | Write: only resources with the tag clickhouse-byoc=true. Read: all VPC Lattice and AWS RAM resources. | Private access to the EKS API |
ClickHouse-CloudWatch-Policy | Read CloudWatch Logs. Create log groups. Tag log groups and set their retention. | Create: only with the tag clickhouse-byoc=true. Tag and retention: only log groups /aws/eks/clickhouse-cloud-*. Read: all log groups. | EKS control plane logs |
ClickHouse-KMS-Policy (optional, off by default) | Read key details. Create grants on keys. | Only KMS keys in the ClickHouse BYOC AWS account | EKS secret encryption |
ClickHouse-KMSTDE-Policy (optional, off by default) | Create KMS keys. Read keys and key policies. Turn on key rotation. Tag keys. No encrypt, decrypt, key policy change, or key deletion. | Tag clickhouse-byoc=true, which the role can add to any key whose key policy allows it | Keys for Transparent Data Encryption (TDE) |
Additional IAM roles created by the controller
In addition to theClickHouseManagementRole created via CloudFormation or Terraform, the controller creates several additional roles for each BYOC infrastructure.
Each role has the prefix <infra>-<region>-. <infra> is the name of your BYOC infrastructure, and <region> is the AWS region.
| Role | Permissions | Purpose |
|---|---|---|
data-plane-mgmt | Read EKS. List and delete objects, and set encryption, versioning, and lifecycle, on the BYOC buckets. Read load balancers and Auto Scaling groups. The ClickHouse management service assumes it, with your external ID. | Day-to-day management of your ClickHouse services and the cluster |
k8s-control-plane | AWS managed AmazonEKSClusterPolicy, AmazonEKSServicePolicy, AmazonEKSVPCResourceController. Only EKS can assume it. | EKS cluster role |
k8s-worker | AWS managed AmazonEKSWorkerNodePolicy, AmazonEKS_CNI_Policy, AmazonEC2ContainerRegistryReadOnly. Assume a read-only role to pull ClickHouse container images. Only EC2 can assume it. | Node role for the system nodes |
karpenter-node (role and instance profile) | Same as k8s-worker, plus AmazonSSMManagedInstanceCore. Only EC2 can assume it. | Node role for the ClickHouse server and Keeper nodes |
karpenter-controller | Launch and terminate EC2 instances that have the tags of this cluster. Read EC2 in the BYOC region. Pass only the karpenter-node role. Read prices and the EKS AMI parameters. | Karpenter: adds and removes nodes for ClickHouse |
cluster-autoscaler | Read Auto Scaling groups. Set the desired capacity and terminate instances in Auto Scaling groups. | Scales the system node groups |
load-balancer-controller | The AWS Load Balancer Controller policy that AWS publishes. Load balancer and target group changes need the tag elbv2.k8s.aws/cluster of any cluster. No scope: listeners, rules, target registration, and tags. | Creates the network load balancers for your service endpoints |
ebs-csi-driver | The EBS CSI driver policy that AWS publishes. Volume and snapshot deletion needs the driver tags. | Disks for ClickHouse and Keeper |
CH-S3-Role | All S3 actions, only under the ClickHouse prefixes in the BYOC shared and backup buckets. Assume roles that you set up for ClickHouse S3 access. Assume a role to send usage data to ClickHouse. | Identity of the ClickHouse server pods. Reads and writes table data and backups. |
thanos | List, read, write, and delete objects in the BYOC monitoring bucket | Stores metrics for monitoring |
state-exporter | Assume a ClickHouse role. No other permissions. | Sends the health of the infrastructure to ClickHouse |
clickhouse-scraper | Assume a ClickHouse role. No other permissions. | Sends usage data for billing to ClickHouse |
kube-metric-forwarder-asc | Assume a ClickHouse role. No other permissions. | Sends Kubernetes metrics to ClickHouse for autoscaling |