> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Work with your organization's policies

> Run e6data on AWS under pre-created roles, SCPs, mandatory tags, region limits and approved node images.

How-to guideApplies to: CloudPrem on AWS

e6data runs under typical organization guardrails: roles pre-created by your identity team, SCPs, mandatory tags, region limits and approved node images. This page shows what each guardrail needs from you.

## Requirements

* Your identity team creates every IAM role and policy. e6data never creates them, during the install or later. The platform team still needs `iam:PassRole` on each workspace role (to `pods.eks.amazonaws.com`) to map it, and the Karpenter role passes the node role.
* Every resource e6data causes to be created can carry your tags. You set the tags in the places listed below.
* e6data makes AWS API calls only in the workspace's region (S3, STS, EC2, Glue, EKS). A region-limit SCP has been verified in us-east-1 with Cluster Autoscaler. With Karpenter, add `pricing:*` to the SCP's `NotAction` so it can read live prices (the AWS Pricing API answers from a few regions only); otherwise it uses built-in prices.
* The SCP guidance on this page was verified with equivalent IAM deny policies, not with AWS Organizations SCPs.

## Your identity team pre-creates every role

| Step | AWS |
| - | - |
| 1. Platform team gives the identity team | Cluster name, workspace name and namespace, bucket names, KMS key, Glue databases |
| 2. Identity team creates | Engine, console and app roles (plus Karpenter, node, load balancer and EBS CSI roles) from the [Permissions reference](https://docs.e6data.com/platform/deploy/aws-cloudprem/permissions-reference.md) |
| 3. Identity team hands back | Role ARNs |
| 4. Platform team installs | With Helm and kubectl, skipping every step that creates a role |
| Platform team's cloud rights | No `iam:*` except `iam:PassRole` on the workspace roles, to `pods.eks.amazonaws.com` |

## Tags on AWS resources

| Resource | Created by | Where you set the tags |
| - | - | - |
| Engine and platform EC2 instances and EBS volumes | Karpenter | `spec.tags` in both workspace EC2NodeClasses (`<workspace>-nodeclass` for engines, `<workspace>-platform-nodeclass` for console, query router and compaction) |
| Instances, root volumes, primary network interfaces | Managed node groups | Launch template `TagSpecifications` for `instance`, `volume` and `network-interface` (tag-on-create verified with Cluster Autoscaler) |
| Instance tags visible in the `RunInstances` request | Managed node groups | Auto Scaling group tags with `PropagateAtLaunch=true`. Add these too if your SCP checks the request |
| Pod network interfaces | VPC CNI | `vpc-cni` add-on setting `env.ADDITIONAL_ENI_TAGS`, for example `{"cost-center":"…","Team":"…"}` |
| Load balancer (only if e6data creates it) | AWS Load Balancer Controller | Annotation `service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags` in the query router service annotations |
| EBS volumes from the gp3 StorageClass (only if a workload creates PVCs) | EBS CSI driver | `tagSpecification_1`, `tagSpecification_2`, ... parameters on the StorageClass |
| S3 buckets, IAM roles, KMS keys, EKS cluster | You | Your own infrastructure code |

> [!WARNING]
>
> Managed node groups do not copy their own tags onto EC2 instances. Put the tags in the launch template.

> [!WARNING]
>
> With Karpenter, if one required tag is missing from the EC2NodeClass, Karpenter can't launch nodes and clusters stay `Pending`. Run a test launch before go-live.

The e6data install creates two EC2NodeClasses per workspace (engine and platform). The e6data operator can also create and change EC2NodeClasses (its role allows it), and warm pools reuse them. Re-running the e6data install re-applies the template, so re-apply your tag and image changes afterwards, or keep them in your own copy of the template.

## Approved node images

| | AWS |
| - | - |
| What "approved" means | Your own AMI IDs, including a golden AMI |
| Where you set it | `amiSelectorTerms` in the workspace EC2NodeClass, or the launch template `ImageId` |
| Verified images | EKS-optimised AL2023 arm64 pinned by AMI ID (IMDSv2, hop limit 1), and Bottlerocket 1.69 arm64 pinned |

In the EC2NodeClass:

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
apiVersion: karpenter.k8s.aws/v1
kind: EC2NodeClass
spec:
  amiSelectorTerms:
    - id: ami-0123456789abcdef0   # your approved arm64 AMI
    - id: ami-0fedcba9876543210   # your approved x86_64 AMI (only if you allow x86 engine nodes)
```

Don't use `alias: al2023@latest` under an AMI allow-list. It resolves to a new AMI ID over time, and your SCP will deny it.

Requirements for a golden AMI on AWS:

* EKS-compatible for your cluster version (for example built from EKS-optimised Amazon Linux 2023 or Bottlerocket).
* ARM64 (Graviton) recommended. Provide an x86\_64 image too if you restrict to x86.
* containerd runtime, joining with the standard EKS bootstrap (nodeadm for AL2023).
* A writable container filesystem. Engine pods need local scratch space on the node's disk.

With a custom AMI ID in a managed node group launch template, EKS doesn't add the node group's labels and taints at boot. Set them in the nodeadm `NodeConfig`:

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
apiVersion: node.eks.aws/v1alpha1
kind: NodeConfig
spec:
  cluster: {name: <cluster>, apiServerEndpoint: <endpoint>, certificateAuthority: <ca>, cidr: <service-cidr>}
  kubelet:
    flags:
      - --node-labels=e6data.io/node-group=engine
      - --register-with-taints=e6data.io/node-group=engine:NoSchedule
```

## Preflight check

* `aws ec2 run-instances --dry-run` with your EC2NodeClass tags and AMI, as the Karpenter role. Expected: `DryRunOperation`. If `UnauthorizedOperation`, add the missing tag or AMI.
* `aws iam simulate-principal-policy` on each e6data role for `iam:CreateRole`. Expected: `explicitDeny` or `implicitDeny`.

## Verify

1. Resume a cluster from the e6data console. It reaches **Running**.
2. Every new instance, volume and network interface carries your required tags.
3. Run a query and check it appears in **Query History**.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Clusters stay `Pending`, Karpenter can't launch | A required tag or AMI ID is missing from the EC2NodeClass | Add it, then resume again |
| Instances untagged (AWS managed node groups) | Tags only on the node group | Add launch template `TagSpecifications` and ASG tags |
| Your tags or AMI disappear after an upgrade | The e6data install re-applied the EC2NodeClass template | Re-apply your changes or keep your own template copy |

## See also

* [Permissions reference](https://docs.e6data.com/platform/deploy/aws-cloudprem/permissions-reference.md)
* [Least privilege](https://docs.e6data.com/platform/deploy/aws-cloudprem/least-privilege.md)
* [Node provisioning](https://docs.e6data.com/platform/deploy/aws-cloudprem/node-provisioning.md)
* [Pod security](https://docs.e6data.com/platform/deploy/aws-cloudprem/pod-security.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.