When You Need Cross-Account Access
Cross-account IAM configuration is required when Streamkap needs to interact with AWS resources that live in your AWS account:- S3 destination — writing CDC data to your S3 bucket
- Apache Iceberg with AWS Glue catalog — managing Glue catalog tables and writing to your S3 storage
- Redshift — loading data into a Redshift cluster in your account
- BYOC deployments — provisioning and managing infrastructure in your AWS sub-account
- Any AWS resource not hosted in Streamkap’s managed account
Some connectors (such as S3) also support AWS Access Key / Secret Access Key authentication. Cross-account IAM role assumption is the recommended approach for production environments because it avoids long-lived credentials.
How It Works
Cross-account role assumption follows a trust-based model:- You create an IAM role in your AWS account with the permissions Streamkap needs.
- You attach a trust policy to that role that allows Streamkap’s AWS account to assume it.
- Streamkap calls
sts:AssumeRoleto obtain temporary credentials scoped to that role. - Streamkap uses those temporary credentials to access your resources.
Step-by-Step Setup
Create an IAM Role in Your AWS Account
- Sign in to the AWS IAM Console.
- Navigate to Roles in the sidebar.
- Click Create role.
- Under Trusted entity type, select Custom trust policy.
- Paste the trust policy from the Trust Policy Template section below.
- Click Next.
Attach Permission Policies
Attach one or more permission policies depending on which Streamkap connectors you are using. See the Permission Policies by Resource section for ready-to-use templates.
- On the Add permissions page, click Create policy (opens in a new tab).
- Switch to the JSON tab and paste the appropriate policy.
- Name the policy descriptively (e.g.,
StreamkapS3Access,StreamkapGlueAccess). - Return to the role creation tab and attach the newly created policy.
- Click Next.
Name and Create the Role
- Enter a Role name (e.g.,
StreamkapConnectorAccess). - Review the trust policy and permissions.
- Click Create role.
- On the role detail page, copy the Role ARN (e.g.,
arn:aws:iam::<your-account-id>:role/StreamkapConnectorAccess).
Trust Policy Template
The trust policy controls who can assume the role. The following template grants Streamkap’s AWS account the ability to assume the role, with an external ID condition to prevent confused deputy attacks.Streamkap’s AWS account ID is
300973880807. The external ID will be provided during connector setup in the Streamkap app. If you need these values before starting the connector configuration, contact Streamkap support.For some connectors (such as AWS Glue), the trust policy principal may reference a specific IAM role rather than the account root. In that case, use:The Streamkap app will indicate which principal to use during connector setup.
Permission Policies by Resource
Attach only the permissions required for your specific use case. Each tab below provides a minimal policy template scoped to specific resources.- S3
- Glue
- Redshift
- BYOC
Required for the S3 destination connector and any connector that writes data to your S3 bucket (including Apache Iceberg).Replace
<bucket_name> with your actual S3 bucket name.Security Best Practices
Follow these guidelines to keep your cross-account IAM configuration secure:- Always use an external ID condition. The external ID in the trust policy prevents confused deputy attacks, where another AWS customer could trick Streamkap into accessing your resources.
-
Scope permissions to specific resources. Avoid using
"Resource": "*"in permission policies. Always specify resource-level ARNs (bucket names, database names, cluster identifiers) to limit what the role can access. - Use separate roles for separate concerns. If you use multiple Streamkap connectors (e.g., S3 and Glue), consider whether a single role with combined permissions or separate roles per connector better fits your security posture.
- Enable CloudTrail logging. AWS CloudTrail records every API call made by the assumed role. Enable CloudTrail in your account to maintain a full audit trail of Streamkap’s actions.
- Review permissions periodically. As your Streamkap usage evolves, review the attached permission policies to ensure they still follow the principle of least privilege.
-
Do not attach AWS managed policies with broad access (e.g.,
AmazonS3FullAccess). Use the minimal custom policies provided in this guide.
Troubleshooting
Access Denied when Streamkap tries to write to S3 or Glue
Access Denied when Streamkap tries to write to S3 or Glue
This typically means the permission policy is missing required actions or the resource ARNs are incorrect.
- Verify the bucket name or Glue database name in the policy matches your actual resource.
- Confirm both the bucket ARN (
arn:aws:s3:::bucket-name) and the object ARN (arn:aws:s3:::bucket-name/*) are included. - Check that all required actions are listed. For example, S3 writes require both
s3:PutObjectands3:AbortMultipartUpload. - In the AWS Console, use IAM Policy Simulator or check CloudTrail logs to identify the exact denied action.
Role cannot be assumed
Role cannot be assumed
Streamkap cannot assume the role if the trust policy is misconfigured.
- Verify the Principal in the trust policy uses the correct Streamkap account ID (
300973880807). - Check that the external ID matches the value provided by Streamkap during connector setup.
- Ensure there are no typos in the trust policy JSON. Note: the double colon in
arn:aws:iam::300973880807:rootis correct — IAM is a global service, so the region field is empty. - If using a role-based principal (e.g., for Glue), confirm the full role ARN is correct:
arn:aws:iam::300973880807:role/kafkaConnectTenantAccessRole.
Partial permissions -- some operations succeed, others fail
Partial permissions -- some operations succeed, others fail
If Streamkap can perform some operations but not others, the permission policy is likely incomplete.
- Compare your policy against the templates in the Permission Policies by Resource section.
- Check for missing actions. For example, Glue catalog operations require both table-level and partition-level actions.
- Verify the
ResourceARN patterns cover all required resources. A policy scoped to a specific table will fail when the connector tries to create a new table. - Review CloudTrail for
AccessDeniedevents to identify the specific missing action and resource.
Connector works initially but fails after some time
Connector works initially but fails after some time
Temporary credentials obtained through role assumption have a maximum session duration.
- Check the Maximum session duration setting on your IAM role (default is 1 hour, configurable up to 12 hours). Streamkap automatically refreshes credentials, but very short durations may cause issues.
- Verify the IAM role has not been modified or had policies detached since initial setup.
- Check if AWS Service Control Policies (SCPs) in your organization have changed and are now blocking the required actions.
BYOC-specific IAM requirements: BYOC deployments have additional IAM requirements for infrastructure provisioning. Refer to the AWS BYOC page for the complete setup instructions, including CloudFormation templates.
Session tags and permission boundaries: Streamkap does not currently use IAM session tags or permission boundaries during role assumption. If your organization enforces permission boundaries, ensure the boundary policy permits the actions listed in the permission policies above.