Skip to main content

Credential Configuration

Bring Your Own Cloud

A credential configuration lets a warehouse read and write your S3 bucket and lets VeloDB Cloud deploy compute in your AWS account. Create the S3 bucket and IAM roles in the AWS console, then register their names and ARNs in the VeloDB Cloud console.

What to prepare​

Create the following AWS resources and enter the matching values in the credential wizard:

Wizard stepWhat VeloDB Cloud needsYou create in the AWS consoleYou enter in the VeloDB Cloud console
Basic InformationStorage for warehouse dataAn S3 bucket in the warehouse regionBucket Name (the bucket name only, not an ARN)
Storage AccessPermission for the warehouse to read and write the bucketA data-access IAM policy and role, with an instance profileInstance Profile ARN (arn:aws:iam::<aws-account-id>:instance-profile/<role-name>)
Infrastructure AccessPermission for VeloDB Cloud to deploy computeA deployment IAM policy and a cross-account role that trusts VeloDB Cloud with an external IDCross-Account Role ARN (arn:aws:iam::<aws-account-id>:role/<role-name>)

Review the deployment permissions on the cross-account role and the storage permissions on the data-access role. The instance profile makes the data-access role available to warehouse EC2 instances.

Before you start​

  • This procedure applies only to AWS warehouses.
  • Use an AWS account with permission to create an S3 bucket, IAM policies, and IAM roles.
  • Create the S3 bucket in the same AWS region as the warehouse. The credential wizard validates the bucket region.
  • To register a credential in advance, you must be an organization administrator. You can instead add one inline while creating a BYOC warehouse deployed on Custom Infrastructure.

Complete the credential configuration​

The credential wizard and AWS setup have a dependency: the Infrastructure Access step provides the deployment policy, External ID, and Trust Account ID required by the cross-account role. Complete the workflow in this order:

  1. Create the S3 bucket in the warehouse region.
  2. Open the credential wizard and complete Basic Information with the bucket name.
  3. Create the data-access IAM policy and service IAM role. Enter the role's instance profile ARN in Storage Access, then click Continue.
  4. Copy the deployment policy, External ID, and Trust Account ID from Infrastructure Access. Create the deployment IAM policy and cross-account IAM role.
  5. Enter the cross-account role ARN in Infrastructure Access, then click Confirm to save the credential.

Credential wizard reference​

Open the wizard from the Cloud Resources page, or add a credential inline while creating a BYOC warehouse deployed on Custom Infrastructure. The fields below correspond to the workflow above.

  1. Open the Cloud Resources page, click Add New Configuration, and choose Credential Configuration from the dropdown to open Add New Credential Configuration.

  2. Basic Information: identify the credential and the S3 bucket where the warehouse stores data. Create the bucket first (see Create the S3 bucket), then fill in these fields and click Continue:

    • Credential Configuration Name: a name for the credential.
    • Cloud Platform: AWS.
    • Region: the region where you created the bucket. The console validates the bucket against this region, so it must match.
    • Bucket Name: the bucket name only, not an ARN.

    Note:

    Cloud Platform and Region appear only when you create the credential from the Cloud Resources page. When you add a credential inline while creating a warehouse deployed on Custom Infrastructure, both are inherited from the warehouse and hidden, so the credential always uses the warehouse region.

  3. Storage Access: enter the Instance Profile ARN (arn:aws:iam::<aws-account-id>:instance-profile/<role-name>) for the data-access role that the warehouse's EC2 instances assume to read and write your bucket, then click Continue. To create the role and its instance profile, see Create the service IAM role.

  4. Infrastructure Access: enter the Cross-Account Role ARN (arn:aws:iam::<aws-account-id>:role/<role-name>) of the role VeloDB Cloud assumes to deploy compute, then click Confirm to save the credential. This step also shows the External ID and Trust Account ID you need to create the role. For new credentials, the recommended trusted principal is arn:aws:iam::757278738533:role/VeloDBDeploymentAssumer. To create the role, see Create the cross-account IAM role.

AWS resource procedures​

Create these resources in the AWS console if you do not already have them. The deployment policy references the S3 bucket and service role, so follow the sections in this order.

Create an S3 bucket​

Note:

The bucket must be in the same AWS region as the warehouse. Use a dedicated bucket for each warehouse.

  1. Sign in to the AWS S3 Console as an administrator and click Create bucket.
  2. Enter a bucket name (for example, velodb-warehouse-data) and select the target region.
  3. Click Create bucket, then copy the bucket name for the Basic Information step.

For more information, see the AWS documentation for creating a general purpose bucket.

Create the data-access IAM policy​

The warehouse's EC2 instances read and write your S3 bucket through an IAM role they assume. Create its policy first, then the role in Create the service IAM role.

  1. Open the AWS IAM Console and go to Policies → Create policy.
  2. On the JSON tab, paste the data-access policy. The Storage Access step of Add New Credential Configuration shows it ready to copy, with your bucket name filled in.
  3. Click Next, name the policy (for example, VeloDBDataStorageAccess), and click Create policy.

Note:

The Storage Access step pre-fills this policy with your bucket name, so you can paste it directly. If you copy the reference policy below instead, replace <bucket-name> with your S3 bucket from Basic Information.

The wizard includes the KMSAccess statement by default. Keep it if you enable Transparent Data Encryption (TDE). If you do not use TDE, you can omit this statement unless your S3 bucket requires KMS access. For a bucket encrypted with SSE-KMS, retain the KMS permissions needed to read and write its objects.

Review the data-access role permissions for S3 reads, writes, and encrypted data.

Data-access IAM policy (includes optional KMS permissions)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Resource": "arn:aws:s3:::<bucket-name>",
"Action": [
"s3:GetBucketLocation",
"s3:GetBucketVersioning",
"s3:PutBucketCORS",
"s3:ListBucket",
"s3:ListBucketVersions",
"s3:ListBucketMultipartUploads"
]
},
{
"Effect": "Allow",
"Resource": "arn:aws:s3:::<bucket-name>/*",
"Action": [
"s3:GetObject",
"s3:GetObjectVersion",
"s3:PutObject",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts"
]
},
{
"Effect": "Allow",
"Action": ["sts:AssumeRole"],
"Resource": "*"
},
{
"Sid": "KMSAccess",
"Effect": "Allow",
"Action": [
"kms:Encrypt",
"kms:Decrypt",
"kms:GenerateDataKey*",
"kms:DescribeKey"
],
"Resource": [
"*"
]
}
]
}

For more information, see the AWS documentation for creating IAM policies.

Create the service IAM role​

  1. In the AWS IAM Console, go to Roles → Create role.

  2. Pick AWS service as the trusted entity type and EC2 as the use case.

  3. Attach the policy you just created.

  4. Name the role (for example, VeloDBDataStorageAccessRole) and create it.

  5. On the role's Trust Relationships tab, replace the trust policy with the following. The AWS principal is this role's own ARN: replace <aws-account-id> with your AWS account ID and <role-name> with the role you created in step 4, or copy the role's ARN from its summary page.

    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Principal": {
    "Service": "ec2.amazonaws.com",
    "AWS": "arn:aws:iam::<aws-account-id>:role/<role-name>"
    },
    "Action": "sts:AssumeRole"
    }
    ]
    }
  6. Copy the Instance Profile ARN (format: arn:aws:iam::<aws-account-id>:instance-profile/<role-name>), paste it into the Instance Profile ARN field in the Storage Access step, and click Continue.

For more information, see the AWS documentation for creating a role for an AWS service.

Create the deployment IAM policy​

VeloDB Cloud deploys and manages compute in your account through a cross-account IAM role it assumes with an external ID. Create its policy first: the policy references the bucket and service role you have created. Then create the role in Create the cross-account IAM role.

  1. In the AWS IAM Console, go to Policies → Create policy.
  2. On the JSON tab, paste the deployment policy from Infrastructure Access. The wizard fills in the account, bucket, and role. If the policy lacks the grant for tagging endpoint resources during creation, add it before saving.
  3. Click Next, name the policy (for example, AllowVeloDBCrossAccountAccess), and click Create policy.

If you use the reference policy below, replace <bucket-name> with the S3 bucket from Basic Information and <role-name> with the service role you created in Create the service IAM role (for example, VeloDBDataStorageAccessRole), and <aws-account-id> with your AWS account ID.

The wizard includes the final KMS statement by default. The permissions you need depend on your encryption settings:

  • Customer-managed EBS encryption: keep the KMS statement so VeloDB Cloud can validate the key and deploy encrypted volumes. This also applies if the AWS Region uses a customer-managed key for EBS encryption by default.
  • TDE only: keep kms:DescribeKey, kms:ListKeyPolicies, and kms:GetKeyPolicy so VeloDB Cloud can validate the TDE key. The other actions in this statement are not required for TDE alone.
  • Neither TDE nor customer-managed EBS encryption: you can omit the KMS statement from the deployment policy.

Review the deployment role permissions for setup and cluster operations.

Deployment IAM policy (includes optional KMS permissions)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:TerminateInstances",
"ec2:StopInstances",
"ec2:StartInstances",
"ec2:RebootInstances",
"ec2:ModifyInstanceAttribute",
"ec2:ModifyVolume"
],
"Resource": [
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"StringEquals": {
"aws:ResourceTag/resource-created-by": "velodb"
}
}
},
{
"Effect": "Allow",
"Action": "elasticloadbalancing:AddTags",
"Resource": [
"arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*",
"arn:aws:elasticloadbalancing:*:*:targetgroup/*",
"arn:aws:elasticloadbalancing:*:*:listener/net/*"
],
"Condition": {
"StringEquals": {
"elasticloadbalancing:CreateAction": [
"CreateLoadBalancer",
"CreateTargetGroup",
"CreateListener"
],
"aws:RequestTag/resource-created-by": "velodb"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:DescribeVpcs",
"ec2:DescribeSubnets",
"ec2:DescribeAccountAttributes",
"ec2:DescribeAddresses",
"ec2:DescribeNatGateways",
"ec2:DescribeInternetGateways",
"ec2:DescribeInstances",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSecurityGroupRules",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeInstanceTypes",
"ec2:ModifyInstanceAttribute",
"ec2:DescribeVolumes",
"ec2:DescribeImages",
"ec2:DescribeVpcEndpoints",
"ec2:DescribePrefixLists",
"ec2:DescribeRouteTables",
"ec2:DescribeTags",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeTargetGroupAttributes",
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:DescribeTargetHealth",
"elasticloadbalancing:DescribeTargetGroups",
"iam:GetPolicy",
"iam:GetPolicyVersion"
],
"Resource": ["*"]
},
{
"Effect": "Allow",
"Action": ["ec2:RunInstances", "ec2:CreateTags"],
"Resource": [
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:network-interface/*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/resource-created-by": "velodb"
}
}
},
{
"Effect": "Allow",
"Action": ["ec2:RunInstances"],
"Resource": [
"arn:aws:ec2:*:*:image/*",
"arn:aws:ec2:*:*:security-group/*",
"arn:aws:ec2:*:*:subnet/*"
]
},
{
"Effect": "Allow",
"Action": ["ec2:CreateTags", "ec2:DeleteTags"],
"Resource": [
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:network-interface/*"
],
"Condition": {
"StringEquals": {
"ec2:ResourceTag/resource-created-by": "velodb"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:CreateListener",
"elasticloadbalancing:CreateLoadBalancer",
"elasticloadbalancing:CreateTargetGroup"
],
"Resource": [
"arn:aws:elasticloadbalancing:*:*:targetgroup/*",
"arn:aws:elasticloadbalancing:*:*:loadbalancer/*",
"arn:aws:elasticloadbalancing:*:*:listener/*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/resource-created-by": "velodb"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:RegisterTargets",
"elasticloadbalancing:DeleteLoadBalancer",
"elasticloadbalancing:ModifyTargetGroupAttributes",
"elasticloadbalancing:DeregisterTargets",
"elasticloadbalancing:DeleteTargetGroup",
"elasticloadbalancing:ModifyLoadBalancerAttributes",
"elasticloadbalancing:DeleteListener"
],
"Resource": [
"arn:aws:elasticloadbalancing:*:*:targetgroup/*",
"arn:aws:elasticloadbalancing:*:*:loadbalancer/*",
"arn:aws:elasticloadbalancing:*:*:listener/*"
],
"Condition": {
"StringEquals": {
"elasticloadbalancing:ResourceTag/resource-created-by": "velodb"
}
}
},
{
"Effect": "Allow",
"Action": [
"elasticloadbalancing:AddTags",
"elasticloadbalancing:RemoveTags"
],
"Resource": ["arn:aws:elasticloadbalancing:*:*:*"],
"Condition": {
"StringEquals": {
"elasticloadbalancing:ResourceTag/resource-created-by": "velodb"
}
}
},
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetBucketVersioning",
"s3:GetBucketPublicAccessBlock",
"s3:GetLifecycleConfiguration",
"s3:PutLifecycleConfiguration",
"s3:ListBucket"
],
"Resource": ["arn:aws:s3:::<bucket-name>"]
},
{
"Effect": "Allow",
"Action": [
"iam:GetInstanceProfile",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:ListRolePolicies",
"iam:ListAttachedRolePolicies"
],
"Resource": [
"arn:aws:iam::<aws-account-id>:instance-profile/<role-name>",
"arn:aws:iam::<aws-account-id>:role/<role-name>"
]
},
{
"Effect": "Allow",
"Action": ["iam:PassRole"],
"Resource": [
"arn:aws:iam::<aws-account-id>:role/<role-name>"
],
"Condition": {
"StringEquals": {
"iam:PassedToService": "ec2.amazonaws.com"
}
}
},
{
"Effect": "Allow",
"Action": ["iam:CreateServiceLinkedRole"],
"Resource": [
"arn:aws:iam::*:role/aws-service-role/elasticloadbalancing.amazonaws.com/AWSServiceRoleForElasticLoadBalancing"
],
"Condition": {
"StringEquals": {
"iam:AWSServiceName": "elasticloadbalancing.amazonaws.com"
}
}
},
{
"Effect": "Allow",
"Action": [
"kms:DescribeKey",
"kms:GetKeyPolicy",
"kms:ListKeyPolicies",
"kms:Encrypt",
"kms:Decrypt",
"kms:ReEncrypt*",
"kms:GenerateDataKey*",
"kms:CreateGrant"
],
"Resource": [
"*"
]
}
]
}

Note:

The KMS statements above use Resource: "*", as generated by the credential wizard. If you use customer-managed keys for TDE or Amazon EBS encryption, also configure the KMS key policy for the required roles and usage. IAM permissions alone do not establish access to a KMS key.

For more information, see the AWS documentation for creating IAM policies.

Create the cross-account IAM role​

  1. In the AWS IAM Console, go to Roles → Create role.

  2. Trusted Entity Type: Select Custom trust policy.

  3. External ID: paste the External ID shown in the console's Infrastructure Access step. For new credentials, Trust Account ID shows arn:aws:iam::757278738533:role/VeloDBDeploymentAssumer. Use this role ARN for Principal.AWS in the trust policy below.

  4. Custom trust policy: Paste this trust policy.

    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Principal": {
    "AWS": "arn:aws:iam::757278738533:role/VeloDBDeploymentAssumer"
    },
    "Action": "sts:AssumeRole",
    "Condition": {
    "StringEquals": {
    "sts:ExternalId": "<external-id>"
    }
    }
    }
    ]
    }

    Replace <external-id> with the External ID shown in the console's Infrastructure Access step. Keep the full VeloDBDeploymentAssumer role ARN as the trusted principal. Trusting the AWS account root principal belongs to the older workflow; use the role ARN for new credentials.

  5. Permissions: attach the deployment policy you created earlier.

  6. Name the role (for example, VeloDBCrossAccountRole) and create it.

  7. Copy the Role ARN, paste it into the Infrastructure Access step as the Cross-Account Role ARN, then click Confirm to save the credential.

For more information, see the AWS documentation for using IAM roles for cross-account access.

Verify the credential configuration​

The credential appears on the Credential Configuration tab of the Cloud Resources page after the console saves it. You can now select it when you create a network configuration or a warehouse deployed on Custom Infrastructure.

IAM permission reference​

Deployment role permissions​

VeloDB Cloud assumes this cross-account role to check the resources you register in Custom Infrastructure and manage the warehouse in your AWS account.

Register credentials and networking​

OperationPermissions and when they apply
Verify the S3 buckets3:ListBucket authorizes the HeadBucket access check. s3:GetBucketLocation, s3:GetBucketVersioning, and s3:GetBucketPublicAccessBlock let the wizard check the Region, versioning, and public access settings.
Verify the instance profile and data-access roleiam:GetInstanceProfile and iam:GetRole identify the role and its trust policy. For inline policies, the wizard uses iam:ListRolePolicies and iam:GetRolePolicy. For attached managed policies, it uses iam:ListAttachedRolePolicies, iam:GetPolicy, and iam:GetPolicyVersion.
Verify subnet placement and security rulesec2:DescribeVpcs, ec2:DescribeSubnets, ec2:DescribeAvailabilityZones, ec2:DescribeSecurityGroups, and ec2:DescribeSecurityGroupRules let the wizard check where nodes can run and what traffic the network allows.
Inspect routes, gateways, and VPC endpointsec2:DescribeRouteTables, ec2:DescribeNatGateways, ec2:DescribeInternetGateways, and ec2:DescribeVpcEndpoints cover routes, gateways, and existing endpoints. For private connectivity to VeloDB Cloud, you supply an existing endpoint ID in the network configuration. The wizard needs only read access to VPC endpoints.
Register a customer-managed key for TDE or EBSkms:DescribeKey, kms:ListKeyPolicies, and kms:GetKeyPolicy let VeloDB Cloud check the key and its policy. These are the only deployment-role KMS permissions needed for TDE alone.

The deployment policy also grants read access to EC2 account settings, Elastic IP addresses, and service prefix lists through ec2:DescribeAccountAttributes, ec2:DescribeAddresses, and ec2:DescribePrefixLists. EC2 discovery and managed IAM policy reads use Resource: "*".

Create, scale, and retire compute​

OperationPermissions and when they apply
Create a warehouse or cluster, or scale out by adding nodesec2:DescribeImages and ec2:DescribeInstanceTypes cover the AMI and node type. ec2:RunInstances launches the nodes, ec2:CreateTags tags their resources, and iam:PassRole passes the registered data-access role to EC2. ec2:DescribeInstances checks when nodes are running.
Scale in, replace a node, or retire a clusterFor a node serving endpoint traffic, elasticloadbalancing:DeregisterTargets removes it from the target group. ec2:TerminateInstances releases the instance when VeloDB Cloud retires it. A replacement uses the same launch permissions as scale-out.
Change the instance type of an existing nodeec2:StopInstances, ec2:ModifyInstanceAttribute, and ec2:StartInstances let VeloDB Cloud stop the node, change its instance type, and start it again.
Expand a node's EBS volumeec2:DescribeVolumes identifies the attached volume and its capacity. ec2:ModifyVolume changes the volume in place.
Suspend or resume compute, or reboot a nodeSuspension and resumption use ec2:StopInstances and ec2:StartInstances. ec2:RebootInstances restarts the EC2 instance.
Update resource tagsec2:DescribeTags, ec2:CreateTags, and ec2:DeleteTags cover reading, adding, and removing tags on warehouse resources.
Provision EBS volumes with a customer-managed keyThe deployment policy includes kms:Decrypt, kms:GenerateDataKey*, kms:ReEncrypt*, and kms:CreateGrant for encrypted volumes. It also grants kms:Encrypt. This configuration applies when you select a key or your Region uses a customer-managed EBS key by default. See AWS requirements for EBS encryption.
Manage S3 expiration rules for warehouse datas3:GetLifecycleConfiguration and s3:PutLifecycleConfiguration let VeloDB Cloud read the existing rules and add or remove rules for a warehouse prefix. The write permission covers the entire bucket lifecycle configuration.

EC2 permission scope. The policy requires the request tag resource-created-by=velodb on new instances, volumes, and network interfaces. It allows launches using the selected AMI, subnet, and security group. The ec2:CreateTags grant also allows the deployment role to apply the tag to existing, untagged resources. Actions that check the resource tag, including stopping or terminating instances and modifying volumes, then apply to those resources. A separate grant allows ec2:ModifyInstanceAttribute on Resource: "*" even for untagged instances. The iam:PassRole grant covers only the registered role and requires iam:PassedToService to be ec2.amazonaws.com.

KMS permission scope. The reference policy uses Resource: "*" and places no grant-specific condition on kms:CreateGrant. The wildcard in kms:GenerateDataKey* also covers data key pairs, and kms:ReEncrypt* covers both source and destination keys. The KMS key policy must allow the relevant role to use the key.

Manage warehouse connection endpoints​

A warehouse connection endpoint routes client traffic through an AWS Network Load Balancer. The deployment role manages the load balancer, its listeners, and its target groups.

OperationPermissions and when they apply
Create a warehouse connection endpointelasticloadbalancing:CreateLoadBalancer, elasticloadbalancing:CreateTargetGroup, and elasticloadbalancing:CreateListener create the network path. AWS also checks elasticloadbalancing:AddTags when these resources are created with tags. If the account lacks the Elastic Load Balancing service-linked role, initial setup also requires iam:CreateServiceLinkedRole for that role.
Route traffic to new nodes or drain retiring nodeselasticloadbalancing:RegisterTargets adds nodes that serve the endpoint. elasticloadbalancing:DeregisterTargets removes them during scale-in or replacement. elasticloadbalancing:DescribeTargetHealth shows when targets are healthy or draining.
Check and configure routingelasticloadbalancing:DescribeLoadBalancers, elasticloadbalancing:DescribeListeners, and elasticloadbalancing:DescribeTargetGroups identify the endpoint and its routing configuration. The policy grants elasticloadbalancing:DescribeLoadBalancerAttributes and elasticloadbalancing:ModifyLoadBalancerAttributes for settings such as cross-zone routing, and elasticloadbalancing:DescribeTargetGroupAttributes and elasticloadbalancing:ModifyTargetGroupAttributes for settings such as the deregistration delay.
Update endpoint tagselasticloadbalancing:DescribeTags, elasticloadbalancing:AddTags, and elasticloadbalancing:RemoveTags cover tags on the load balancer and related resources.
Retire a warehouse connection endpointelasticloadbalancing:DeleteListener, elasticloadbalancing:DeleteTargetGroup, and elasticloadbalancing:DeleteLoadBalancer release the endpoint resources.

The policy requires resource-created-by=velodb in requests that create endpoint resources. To modify or delete an existing endpoint resource, the resource must already carry that tag. The read actions use Resource: "*".

Authorize tags during endpoint creation​

Elastic Load Balancing (ELB) checks elasticloadbalancing:AddTags when a create request includes tags. The deployment policy above grants this action during creation of a Network Load Balancer, target group, or listener when the request includes resource-created-by=velodb. A separate statement allows tag updates on resources that already carry the tag. See AWS authorization for tags during creation.

If a policy from Infrastructure Access or a previously saved policy grants elasticloadbalancing:AddTags only on existing tagged resources, add the following statement to its Statement array.

{
"Effect": "Allow",
"Action": "elasticloadbalancing:AddTags",
"Resource": [
"arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*",
"arn:aws:elasticloadbalancing:*:*:targetgroup/*",
"arn:aws:elasticloadbalancing:*:*:listener/net/*"
],
"Condition": {
"StringEquals": {
"elasticloadbalancing:CreateAction": [
"CreateLoadBalancer",
"CreateTargetGroup",
"CreateListener"
],
"aws:RequestTag/resource-created-by": "velodb"
}
}
}

Data-access role permissions​

Warehouse nodes use this role through their EC2 instance profile. The S3 grants cover the registered bucket and every object key in it.

OperationPermissions and when they apply
Obtain temporary credentialsEC2 obtains the node's initial credentials through the instance profile because the data-access role's trust policy allows EC2 to assume it. Once a node has credentials, the role's sts:AssumeRole grant on Resource: "*" allows its session to assume the same role again or another role that trusts it.
Read, write, and clean up warehouse datas3:GetBucketLocation identifies the bucket's Region. s3:ListBucket, s3:GetObject, and s3:PutObject let nodes list, read, and write warehouse data. s3:DeleteObject deletes an unversioned object by key. With versioning enabled, it adds a delete marker. With versioning suspended, it adds a delete marker and removes the null version if one exists.
Work with versioned objectss3:GetBucketVersioning checks the bucket setting. s3:ListBucketVersions, s3:GetObjectVersion, and s3:DeleteObjectVersion cover listing versions, reading an earlier version, and permanently removing a version or delete marker.
Upload large objects in partss3:PutObject covers uploading parts and completing the upload. s3:ListBucketMultipartUploads, s3:ListMultipartUploadParts, and s3:AbortMultipartUpload cover finding, inspecting, and canceling incomplete uploads.
Register the data-access policyCredential validation expects s3:PutBucketCORS in the bucket permissions. This grants the role permission to change the bucket's cross-origin resource sharing (CORS) rules.
Use Transparent Data Encryption (TDE)The optional KMS statement grants kms:DescribeKey, kms:GenerateDataKey*, kms:Encrypt, and kms:Decrypt for the warehouse's encryption keys. It uses Resource: "*", and access to each key depends on its key policy.
Read or write S3 objects encrypted with SSE-KMSWrites need kms:GenerateDataKey, reads need kms:Decrypt, and multipart uploads need both. See AWS permissions for SSE-KMS.

Role trust policies​

The trust policy on each role determines who can request temporary credentials for it.

RoleTrust policy actionWho can assume the role and why
Data-access rolests:AssumeRoleEC2 assumes this role through the instance profile so warehouse nodes can access S3. The role's own ARN is also trusted, so a session using this role can request another session for the same role.
Cross-account deployment rolests:AssumeRoleThe VeloDB Cloud deployment principal shown in Infrastructure Access assumes this role to manage warehouse infrastructure. Its request must supply the credential's External ID to satisfy the sts:ExternalId condition.

Permissions reference​

Deployment role permissions
# EC2 instances, volumes, and tags
- ec2:CreateTags # Tag new or existing instances, volumes, and interfaces, including untagged ones, with resource-created-by=velodb. Also update tags on matching resources.
- ec2:DeleteTags # Remove tags from an instance, volume, or network interface that carries the resource tag.
- ec2:ModifyInstanceAttribute # Change instance attributes, including the instance type. The wildcard grant also covers untagged instances.
- ec2:ModifyVolume # Change a tagged EBS volume's size or performance settings.
- ec2:RebootInstances # Reboot a tagged EC2 instance.
- ec2:RunInstances # Launch nodes with the warehouse tag on new instances, volumes, and interfaces.
- ec2:StartInstances # Start a stopped warehouse node that carries the resource tag.
- ec2:StopInstances # Stop a tagged node while retaining its EBS volumes.
- ec2:TerminateInstances # Remove a tagged instance when retiring or replacing a node.

# EC2 resource discovery
- ec2:DescribeAccountAttributes # Inspect EC2 account settings such as the default VPC.
- ec2:DescribeAddresses # Look up Elastic IP addresses and the resources associated with them.
- ec2:DescribeAvailabilityZones # Look up zone names, IDs, and availability when placing nodes.
- ec2:DescribeImages # Check the selected AMI's availability, architecture, and block device mappings.
- ec2:DescribeInstances # Read node state, instance type, and addresses during deployment and scaling.
- ec2:DescribeInstanceTypes # Inspect compute, memory, and storage capabilities for a node's instance type.
- ec2:DescribeInternetGateways # Check which internet gateway is attached to the VPC.
- ec2:DescribeNatGateways # Identify NAT gateways that provide outbound connectivity for private subnets.
- ec2:DescribePrefixLists # Identify AWS service address ranges referenced by prefix list ID, such as the S3 prefix list in a route table.
- ec2:DescribeRouteTables # Inspect subnet routes and their targets, including gateways and endpoints.
- ec2:DescribeSecurityGroupRules # Inspect individual inbound and outbound rules, including ports and allowed addresses.
- ec2:DescribeSecurityGroups # Identify the security groups selected for warehouse resources and verify their VPC.
- ec2:DescribeSubnets # Check the VPC and Availability Zone of each selected subnet.
- ec2:DescribeTags # Look up EC2 resource tags to identify warehouse resources.
- ec2:DescribeVolumes # Inspect EBS capacity, volume type, and node attachments before changing storage.
- ec2:DescribeVpcEndpoints # Check the service, VPC, and status of a configured private or gateway endpoint.
- ec2:DescribeVpcs # Look up the selected VPC and its address ranges.

# Load balancers and endpoint traffic
- elasticloadbalancing:AddTags # Tag endpoint resources during creation when the request includes the warehouse tag, or update tags on resources that already carry it.
- elasticloadbalancing:CreateListener # Connect a frontend port and protocol to a target group.
- elasticloadbalancing:CreateLoadBalancer # Create the network load balancer for a warehouse endpoint.
- elasticloadbalancing:CreateTargetGroup # Create a group of backend nodes that can receive endpoint traffic.
- elasticloadbalancing:DeleteListener # Stop accepting traffic on a retired listener.
- elasticloadbalancing:DeleteLoadBalancer # Release the load balancer when retiring the endpoint.
- elasticloadbalancing:DeleteTargetGroup # Remove a target group after listeners stop referencing it.
- elasticloadbalancing:DeregisterTargets # Remove nodes from a target group when scaling in or replacing them.
- elasticloadbalancing:DescribeListeners # Check which ports and protocols forward traffic to which target groups.
- elasticloadbalancing:DescribeLoadBalancerAttributes # Read settings such as cross-zone routing on an existing load balancer.
- elasticloadbalancing:DescribeLoadBalancers # Look up an endpoint's DNS name, scheme, subnets, and provisioning state.
- elasticloadbalancing:DescribeTags # Identify load balancer resources by their tags.
- elasticloadbalancing:DescribeTargetGroupAttributes # Inspect target group settings, including the deregistration delay.
- elasticloadbalancing:DescribeTargetGroups # Look up backend ports, protocols, and health check configuration.
- elasticloadbalancing:DescribeTargetHealth # Check whether each node is healthy, draining, or unavailable.
- elasticloadbalancing:ModifyLoadBalancerAttributes # Configure load balancer behavior such as cross-zone load balancing and DNS routing by Availability Zone.
- elasticloadbalancing:ModifyTargetGroupAttributes # Adjust how a target group handles connections, for example the delay before a deregistering target finishes draining.
- elasticloadbalancing:RegisterTargets # Add nodes to a target group so they can begin receiving traffic after health checks pass.
- elasticloadbalancing:RemoveTags # Remove tags from an already tagged resource.

# S3 bucket configuration
- s3:GetBucketLocation # Verify that the registered bucket is in the warehouse Region.
- s3:GetBucketPublicAccessBlock # Check which bucket-level S3 Block Public Access settings are enabled.
- s3:GetBucketVersioning # Check the bucket's versioning status during credential validation.
- s3:GetLifecycleConfiguration # Read existing lifecycle rules before updating rules for a warehouse prefix.
- s3:ListBucket # Check bucket access with HeadBucket. The grant also allows listing object keys throughout the bucket.
- s3:PutLifecycleConfiguration # Write the bucket's lifecycle configuration when adding or removing warehouse expiration rules. The grant covers the full bucket configuration.

# IAM roles and policies
- iam:CreateServiceLinkedRole # Create the service-linked role for Elastic Load Balancing when first needed.
- iam:GetInstanceProfile # Check which IAM role the registered instance profile supplies to EC2.
- iam:GetPolicy # Look up a managed policy's default version. The example grants this read on Resource: "*".
- iam:GetPolicyVersion # Read the policy document for a managed policy version to verify its grants. This read also uses Resource: "*".
- iam:GetRole # Read the data-access role's identity and trust policy during validation.
- iam:GetRolePolicy # Read a named inline policy to check the permissions it grants.
- iam:ListAttachedRolePolicies # Find managed policies attached to the data-access role.
- iam:ListRolePolicies # Find inline policies embedded in the data-access role.
- iam:PassRole # Pass the registered data-access role to EC2 so warehouse nodes can use it.

# KMS key validation and EBS encryption
- kms:CreateGrant # Allow AWS to obtain a grant to use the KMS key on behalf of an EC2 instance with encrypted volumes. The example has no grant-specific condition.
- kms:Decrypt # Allow AWS to unwrap the data key for an encrypted EBS volume.
- kms:DescribeKey # Confirm the selected key exists and check its state before deployment.
- kms:Encrypt # Allow KMS to encrypt data key material under the selected key.
- kms:GenerateDataKey* # Generate encrypted data keys for EBS. The wildcard also covers symmetric data keys and asymmetric key pairs with or without plaintext.
- kms:GetKeyPolicy # Read that policy to verify that the required roles can use the key.
- kms:ListKeyPolicies # Find the name of the policy attached to the selected key.
- kms:ReEncrypt* # Re-encrypt with the same or a different key. Covers ReEncryptFrom on the source and ReEncryptTo on the destination.
Data-access role permissions
# Warehouse bucket and objects
- s3:AbortMultipartUpload # Cancel an unfinished upload and release storage used by its uploaded parts.
- s3:DeleteObject # Delete an unversioned object by key. With versioning enabled or suspended, add a delete marker. With versioning suspended, also remove any null version.
- s3:DeleteObjectVersion # Permanently delete a specific version or remove a specific delete marker.
- s3:GetBucketLocation # Look up the bucket's AWS Region so storage requests can use the regional endpoint.
- s3:GetBucketVersioning # Check whether the bucket keeps versions of warehouse objects.
- s3:GetObject # Read the current version of a warehouse object.
- s3:GetObjectVersion # Read a specific object version by its version ID.
- s3:ListBucket # List keys throughout the registered bucket. A request can filter results by warehouse prefix.
- s3:ListBucketMultipartUploads # Find multipart uploads that are still in progress.
- s3:ListBucketVersions # Find specific versions and delete markers in a versioned bucket.
- s3:ListMultipartUploadParts # Check which parts of an individual upload have already reached S3.
- s3:PutBucketCORS # Manage the bucket’s cross-origin request rules, as required by credential validation.
- s3:PutObject # Write warehouse data, including uploading parts and completing a multipart upload.

# Temporary credentials
- sts:AssumeRole # Let an existing data-access role session assume this role again or another role that trusts it.

# Optional KMS access for TDE or SSE-KMS
- kms:Decrypt # Recover a plaintext data key so the warehouse can read encrypted data.
- kms:DescribeKey # Read the KMS key's metadata, including its state and intended usage.
- kms:Encrypt # Encrypt key material under the KMS key, such as a data key used for TDE.
- kms:GenerateDataKey* # Generate symmetric data keys or asymmetric key pairs, including the WithoutPlaintext variants.
Role trust policies
# EC2 service and data-access role
- sts:AssumeRole # Let EC2 use the instance profile and let the data-access role assume itself.

# Cross-account deployment role
- sts:AssumeRole # Let the designated VeloDB Cloud deployment principal assume the role with the credential’s external ID.

See also​

Enter to send · Shift+Enter for a new line