Connect AWS via IAM role
Refine connects to your AWS account via a read-only IAM role. No AWS credentials are ever stored. The role can be revoked from the AWS console at any time.
Steps
- Sign in to your Refine account and open the onboarding flow.
- Copy the Refine AWS account ID and your unique External ID from the onboarding screen.
- In your AWS console, go to
IAM → Roles → Create role. Choose "Another AWS account", paste the Refine account ID, and require the External ID. - Attach the policy below as a customer-managed policy.
- Paste the role ARN back into Refine's onboarding flow. The first scan typically completes within a few minutes.
Permissions policy (short version)
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"ce:Get*", "cur:Describe*", "iam:Get*", "iam:List*",
"ec2:Describe*", "s3:GetBucket*", "s3:ListBucket",
"cloudtrail:Get*", "guardduty:Get*", "rds:Describe*"
],
"Resource": "*"
}]
}The full policy is on Security & Trust.
Trust relationship
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::<REFINE_ACCOUNT_ID>:root" },
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": { "sts:ExternalId": "<YOUR_EXTERNAL_ID>" }
}
}]
}