This guide gives StorHelm access to one of your S3 buckets without sharing any AWS access keys. You create a small IAM role in your own AWS account that StorHelm is allowed to assume. The role is limited to a single bucket and protected by a unique External ID. You can revoke it at any time by deleting the role.
Who does this: the steps in AWS need someone who is allowed to create IAM roles, usually your cloud or IT team. The steps in StorHelm are done by whoever manages your StorHelm account. It typically takes about five minutes.
How it works
- In StorHelm, start a new credential profile, choose IAM role, enter your region and bucket, and save.
- StorHelm generates a unique External ID and shows a ready-to-use CloudFormation template, along with the trust and permissions policies if you prefer to create the role by hand.
- In AWS, create the role from that template.
- Copy the new role's ARN and paste it back into StorHelm.
- StorHelm checks that it can reach the bucket.
You never send an access key or secret. StorHelm stores only your role's ARN and the External ID.
Before you start
- The name of the bucket you want to connect, for example
my-company-bucket. - The bucket's AWS region.
- Access to your AWS account with permission to create an IAM role, or someone who can run a CloudFormation stack for you.
Step 1: Start the profile in StorHelm
- Go to Credentials, then Add profile.
- Give it a name, set Connection method to IAM role, and enter the region and bucket. Leave Role ARN empty for now.
- Save.
StorHelm now shows a panel titled “Set up the cross-account role” with three values to use in AWS:
- Trusted account: StorHelm's AWS account ID, the only account allowed to assume your role.
- External ID: a unique value that ties your role to your StorHelm profile, so nobody else can use it.
- Bucket: the bucket the role is limited to.
Keep that page open. You copy from it in the next step and paste the Role ARN back into it at the end.
Note
The examples below use placeholders: 111122223333 for the trusted account, EXAMPLE-EXTERNAL-ID for the External ID and my-company-bucket for the bucket. Use the values shown on your own profile page. The trusted account is StorHelm's account, not your own account number.
Step 2: Create the role in AWS
Pick whichever method your team prefers. All three create the same role.
Option A: CloudFormation (recommended)
Copy the CloudFormation template shown on your StorHelm profile page. It is already filled in with the trusted account, your External ID and your bucket. For reference, it looks like this:
AWSTemplateFormatVersion: '2010-09-09'
Description: StorHelm cross-account access role
Resources:
S3PortalAccessRole:
Type: AWS::IAM::Role
Properties:
RoleName: S3PortalAccess
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal: { AWS: 'arn:aws:iam::111122223333:root' }
Action: 'sts:AssumeRole'
Condition:
StringEquals: { 'sts:ExternalId': 'EXAMPLE-EXTERNAL-ID' }
Policies:
- PolicyName: S3PortalBucketAccess
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action: [ 's3:ListBucket' ]
Resource: 'arn:aws:s3:::my-company-bucket'
- Effect: Allow
Action: [ 's3:GetObject', 's3:PutObject', 's3:DeleteObject' ]
Resource: 'arn:aws:s3:::my-company-bucket/*'
Outputs:
RoleArn:
Value: !GetAtt S3PortalAccessRole.Arn
Then, in the AWS Console:
- Go to CloudFormation, then Create stack, then With new resources.
- Choose Upload a template file, or paste the template, and continue.
- Give the stack a name such as
storhelm-access, continue through the options, acknowledge that it may create IAM resources, and submit. - When the stack shows
CREATE_COMPLETE, open the Outputs tab and copy the RoleArn value.
Option B: AWS Console, by hand
Go to IAM, then Roles, then Create role. For the trusted entity type choose Custom trust policy and paste the trust policy from your profile page:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::111122223333:root" },
"Action": "sts:AssumeRole",
"Condition": { "StringEquals": { "sts:ExternalId": "EXAMPLE-EXTERNAL-ID" } }
}]
}
Continue to the permissions page, choose Create policy, open the JSON tab and paste the permissions policy from your profile page:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": "arn:aws:s3:::my-company-bucket"
},
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"],
"Resource": "arn:aws:s3:::my-company-bucket/*"
}
]
}
- Name the policy, for example
S3PortalBucketAccess, create it, and attach it to the role. - Name the role
S3PortalAccessand create it. - Open the role and copy its ARN from the top of the page. It looks like
arn:aws:iam::YOUR-ACCOUNT:role/S3PortalAccess.
Option C: Terraform
resource "aws_iam_role" "storhelm_access" {
name = "S3PortalAccess"
assume_role_policy = jsonencode({
Version = "2012-10-17"
Statement = [{
Effect = "Allow"
Principal = { AWS = "arn:aws:iam::111122223333:root" }
Action = "sts:AssumeRole"
Condition = { StringEquals = { "sts:ExternalId" = "EXAMPLE-EXTERNAL-ID" } }
}]
})
}
resource "aws_iam_role_policy" "storhelm_bucket" {
name = "S3PortalBucketAccess"
role = aws_iam_role.storhelm_access.id
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{ Effect = "Allow", Action = ["s3:ListBucket"], Resource = "arn:aws:s3:::my-company-bucket" },
{ Effect = "Allow", Action = ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"], Resource = "arn:aws:s3:::my-company-bucket/*" },
]
})
}
output "role_arn" { value = aws_iam_role.storhelm_access.arn }
Step 3: Put the Role ARN into StorHelm
- Back on the StorHelm profile page, paste the role's ARN into the Role ARN field.
- Save.
StorHelm immediately assumes the role and checks that it can reach your bucket. On success the profile is ready and you can start browsing files. If it fails, see Troubleshooting below.
What access this grants
The role gives StorHelm access to only the one bucket you named:
- List the objects in the bucket (
s3:ListBucket). - Read, upload and delete objects in the bucket (
s3:GetObject,s3:PutObject,s3:DeleteObject).
It grants no access to any other bucket or AWS service, and it cannot be assumed by anyone other than StorHelm presenting your External ID.
Using a role you already have
You can point StorHelm at an existing role instead of creating a new one. Two things must be true of that role.
1. Its trust policy lets StorHelm assume it. Open the role, choose Trust relationships, then Edit, and add this statement to the Statement array. Keep any statements already there.
{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::111122223333:root" },
"Action": "sts:AssumeRole",
"Condition": { "StringEquals": { "sts:ExternalId": "EXAMPLE-EXTERNAL-ID" } }
}
2. Its permissions reach your bucket. The role needs s3:ListBucket on the bucket and s3:GetObject, s3:PutObject and s3:DeleteObject on its objects. If it does not have them, attach the permissions policy from Step 2.
Then paste the existing role's ARN into StorHelm and save, as in Step 3. StorHelm generates the External ID; it cannot be changed to match one the role already uses.
Warning
StorHelm can do whatever the role allows. If an existing role has wide permissions, reusing it grants StorHelm more than it needs. A dedicated S3PortalAccess role, as in Step 2, is the tightest option.
One role for all your buckets
On the Business and Enterprise plans you can add one credential for all buckets instead of a profile per bucket: go to Credentials, then Add credential for all buckets. StorHelm lists every bucket the role can see and you tick the ones to connect.
The setup is the same as above, using the template shown on that credential's page. The trust policy is identical. The permissions policy adds bucket listing and covers every bucket:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"],
"Resource": "arn:aws:s3:::*/*"
}
]
}
To keep StorHelm away from some buckets, replace * in the last two Resource lines with a name pattern, for example arn:aws:s3:::acme-shared-* and arn:aws:s3:::acme-shared-*/*. Buckets outside the pattern may still be listed, but connecting one fails its access check and StorHelm cannot read it.
Security notes
- No credentials are shared. StorHelm stores only your role ARN and External ID, and asks AWS for short-lived temporary credentials each time it works with your bucket.
- The External ID prevents a “confused deputy”. Although the trust policy names StorHelm's account, the role cannot be assumed without your own External ID, so it cannot be used on behalf of another customer.
- You stay in control. To pause access, detach the policy. To revoke it entirely, delete the role.
- You can scope it tighter. Add conditions such as source IP ranges, or narrow the object prefixes in the permissions policy. Keep the four actions above on the bucket StorHelm manages.
Troubleshooting
AccessDenied, or “not authorized to perform sts:AssumeRole”
- The External ID in the role's trust policy does not match the one on your StorHelm profile. Copy it again exactly.
- The trusted account in the trust policy is not StorHelm's account ID. Copy it again from the profile page.
403 or AccessDenied on the bucket
- The permissions policy names the wrong bucket, or the region on the profile does not match the bucket's region.
- A bucket policy, service control policy or VPC endpoint policy may be denying access. Make sure it allows the
S3PortalAccessrole.
NoSuchBucket, or a region error
- Check the exact bucket name and its region.
The bucket is encrypted with a customer-managed KMS key
- Add
kms:Decrypt(for reading) andkms:GenerateDataKey(for uploading) on that key to the role's permissions policy.
Still stuck? Copy the error message StorHelm shows when you save and send it to us. It names the exact AWS reason.
Questions
Can I connect more than one bucket?
Yes. Create a StorHelm profile for each bucket. Each gets its own External ID and role, or you can reuse one role and add the extra bucket to its permissions policy.
Can I use this instead of access keys entirely?
Yes. The IAM role is the recommended method and needs no stored keys. Access keys remain available as a quick start if your team prefers.
What if I change things later?
As long as the role's ARN and External ID stay the same, nothing in StorHelm needs to change. If you recreate the role with a new ARN, paste the new ARN into the profile and save.