Hi guys, I followed all the steps here: <https://d...
# replication-troubleshooting
j
Hi guys, I followed all the steps here: https://docs.airbyte.com/integrations/destinations/s3 And Airbyte servers still can't assume the role. Any help? I can share more data if needed (terraform in the đź§µ)
Copy code
data "aws_iam_policy_document" "airbyte_affinity_data_storage_s3_access" {
  statement {
    actions   = [
      "s3:PutObject",
      "s3:GetObject",
      "s3:DeleteObject",
      "s3:PutObjectAcl",
      "s3:ListBucket",
      "s3:ListBucketMultipartUploads",
      "s3:AbortMultipartUpload",
      "s3:GetBucketLocation"
    ]
    resources = [
      "${aws_s3_bucket.affinity_data.arn}",
      "${aws_s3_bucket.affinity_data.arn}/*"
    ]
  }
}

data "aws_iam_policy_document" "airbyte_affinity_data_storage_trust" {
  statement {
    effect = "Allow"

    principals {
      type        = "AWS"
      identifiers = [
        "arn:aws:iam::094410056844:user/delegated_access_user"
      ]
    }

    actions = ["sts:AssumeRole"]

    condition {
      test     = "StringEquals"
      variable = "sts:ExternalId"
      values   = [var.airbyte_workspace_id]
    }
  }
}

resource "aws_iam_role" "airbyte_affinity_data_storage" {
  name               = local.airbyte_storage_role_affinity_data_name
  assume_role_policy = data.aws_iam_policy_document.airbyte_affinity_data_storage_trust.json
}

resource "aws_iam_policy" "airbyte_affinity_data_storage_s3_access" {
  name   = "polaris_${var.environment}_airbyte_s3_affinity_data_storage_s3_access"
  policy = data.aws_iam_policy_document.airbyte_affinity_data_storage_s3_access.json
}

resource "aws_iam_role_policy_attachment" "attach_airbyte_affinity_data_storage_s3_access" {
  role       = aws_iam_role.airbyte_affinity_data_storage.name
  policy_arn = aws_iam_policy.airbyte_affinity_data_storage_s3_access.arn
}
k
New message text here
j
@kapa.ai, I've setup the correct principals and I'm running the cloud version
k
A message from kapa.ai
j
@kapa.ai should I ask the sales team to enable it?
Copy code
S3 authentication using an IAM role member must be enabled by a member of the Airbyte team. If you'd like to use this feature, please contact the Sales team for more information.
k
A message from kapa.ai
Thanks for confirming you’re on Airbyte Cloud and have set the principals. On Cloud, role-based auth for S3 requires a very specific trust policy. Please double-check these two items: - Trust relationship must allow Airbyte’s delegated access user and enforce your workspace ID as ExternalId: - Principal: arnawsiam:094410056844user/delegated_access_user - Condition: StringEquals: { "sts:ExternalId": "{your-airbyte-workspace-id}" } - Action: sts:AssumeRole. [[S3 IAM role auth](https://docs.airbyte.com/integrations/destinations/s3#authentication-option-1-using-an-iam-role-most-secure); [S3 source IAM role](https://docs.airbyte.com/integrations/sources/s3#step-1-set-up-s3)] - Bucket policy includes both bucket- and object-level permissions (ListBucket, GetBucketLocation, GetObject, PutObject, DeleteObject, etc.). Missing bucket-level permissions can make the connection test fail even if assume role works. [[S3 setup policy](https://docs.airbyte.com/integrations/destinations/s3#step-2-set-up-the-s3-destination-connector-in-airbyte); [S3 Data Lake policy](https://docs.airbyte.com/integrations/destinations/s3-data-lake#setup-guide)] If those match and it still fails: - Confirm you entered the Role ARN in the destination form (and you can omit access keys on Cloud when using the delegated_access_user pattern). [[S3 destination setup](https://docs.airbyte.com/integrations/destinations/s3#step-2-set-up-the-s3-destination-connector-in-airbyte)] - Share the exact error from the connection check and a redacted trust policy so we can spot mismatches (principal ARN or ExternalId). Note: Docs indicate that IAM role auth is supported on Cloud but must be enabled by Airbyte for certain setups. If you suspect it’s not enabled on your workspace, please reach out to Airbyte so they can verify/enable it. [[S3 IAM role auth](https://docs.airbyte.com/integrations/destinations/s3#authentication-option-1-using-an-iam-role-most-secure); [S3 Data Lake IAM role](https://docs.airbyte.com/integrations/destinations/s3-data-lake#setup-guide)]
Short answer: it depends on where you’re running Airbyte. - Airbyte Cloud: IAM role-based S3 auth may require enablement by the Airbyte team. The docs say this feature must be enabled by a team member, and to contact Sales. So yes—if you’re on Cloud and want to use IAM Role auth, reach out to Sales to have it enabled. [[S3 IAM role auth](https://docs.airbyte.com/integrations/destinations/s3#authentication-option-1-using-an-iam-role-most-secure)] - Airbyte Open Source (self-managed): The S3 source docs explicitly state IAM role auth is not supported on OSS. In that case, you’d use access keys or run Airbyte with an instance profile/IRSA and avoid assuming a role via the connector. [[S3 source setup](https://docs.airbyte.com/integrations/sources/s3#step-1-set-up-s3)] If you share whether you’re on Cloud or OSS, I can suggest the exact next steps.