Skip to content

AWS IAM Permissions

BoilStream requires specific AWS IAM permissions depending on which features you use. This guide covers the minimum required permissions and optional advanced permissions.

Quick Start: Minimal S3 Policy

For basic data ingestion to S3, you only need S3 permissions:

json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "BoilStreamS3Access",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME"
        },
        {
            "Sid": "BoilStreamS3Objects",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:AbortMultipartUpload"
            ],
            "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*"
        }
    ]
}

IAM Permissions Required for AWS S3

If you see the error Failed to initialize DuckLake infrastructure: Failed to create IAM role, your AWS credentials don't have the required IAM management permissions.

Solutions:

  1. Grant IAM permissions (recommended) - see Full DuckLake Permissions below
  2. Use S3-compatible storage - MinIO, R2, etc. don't require IAM management

Permission Levels

Level 1: Basic S3 Ingestion

Required permissions for data ingestion only:

PermissionPurpose
s3:ListBucketConnectivity check on startup
s3:PutObjectWrite Parquet files
s3:AbortMultipartUploadClean up failed uploads

Level 2: DuckLake with Static Credentials

If using DuckLake without per-user credential vending:

PermissionPurpose
s3:GetObjectRead Parquet files for queries
s3:DeleteObjectDuckLake VACUUM operations
All Level 1 permissions-
json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "BoilStreamDuckLakeAccess",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:AbortMultipartUpload"
            ],
            "Resource": [
                "arn:aws:s3:::YOUR-BUCKET-NAME",
                "arn:aws:s3:::YOUR-BUCKET-NAME/*"
            ]
        }
    ]
}

Level 3: Full DuckLake with IAM Auto-Provisioning

For enterprise deployments with per-user temporary credentials:

PermissionPurpose
sts:GetCallerIdentityDetect AWS account ID
iam:GetRoleCheck if DuckLake role exists
iam:CreateRoleCreate DuckLake access role
iam:PutRolePolicyAttach S3 policy to role
sts:AssumeRoleVend temporary credentials to users
All Level 2 permissions-
json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "BoilStreamS3Access",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:AbortMultipartUpload"
            ],
            "Resource": [
                "arn:aws:s3:::YOUR-BUCKET-NAME",
                "arn:aws:s3:::YOUR-BUCKET-NAME/*"
            ]
        },
        {
            "Sid": "BoilStreamIAMManagement",
            "Effect": "Allow",
            "Action": [
                "sts:GetCallerIdentity",
                "iam:GetRole",
                "iam:CreateRole",
                "iam:PutRolePolicy"
            ],
            "Resource": "*"
        },
        {
            "Sid": "BoilStreamAssumeRole",
            "Effect": "Allow",
            "Action": "sts:AssumeRole",
            "Resource": "arn:aws:iam::*:role/ducklake-*"
        }
    ]
}

Configuration

Using S3-Compatible Storage (No IAM Required)

For MinIO, Cloudflare R2, or other S3-compatible storage, no IAM permissions are needed:

yaml
storage:
  backends:
    - name: "minio"
      backend_type: "s3"
      enabled: true
      primary: true
      endpoint: "http://localhost:9000"  # Non-AWS endpoint
      bucket: "boilstream"
      access_key: "minioadmin"
      secret_key: "minioadmin"
      use_path_style: true  # Required for MinIO

BoilStream automatically detects non-AWS endpoints and skips IAM provisioning.

Troubleshooting

Error: Failed to initialize DuckLake infrastructure

Full error:

Error: Failed to initialize DuckLake infrastructure: Failed to create IAM role:
ducklake-BUCKET-access: service error

Causes:

  1. Missing IAM permissions (iam:CreateRole, iam:PutRolePolicy)
  2. AWS credentials don't have IAM access
  3. Running outside AWS without proper IAM setup

Solutions:

  1. Grant the Level 3 IAM permissions to your AWS credentials
  2. Use a non-AWS S3-compatible endpoint (MinIO, R2, etc.)

Error: Failed to get AWS account ID

Full error:

Failed to get AWS account ID: service error

Cause: Missing sts:GetCallerIdentity permission or invalid credentials.

Solutions:

  1. Verify credentials work: aws sts get-caller-identity
  2. Add sts:GetCallerIdentity to your IAM policy

Error: AssumeRole test failed

Full error:

AssumeRole test failed: AccessDenied

Cause: The IAM role was created but the credentials can't assume it.

Solutions:

  1. Wait 10-30 seconds for IAM propagation
  2. Verify sts:AssumeRole permission for arn:aws:iam::*:role/ducklake-*
  3. Check the role's trust policy allows your account

Security Best Practices

  1. Use IAM roles on EC2/ECS instead of static credentials
  2. Restrict S3 access to specific bucket and prefix
  3. Use separate credentials for BoilStream vs application workloads
  4. Enable CloudTrail to audit S3 and IAM operations
  5. Rotate credentials regularly if using static access keys

See Also