Skip to documentation
quickS3.comOpen app
Browse documentation
Connections

Connect AWS S3 with an IAM role

Step by step, with screenshots: create an IAM role for quickS3 with one CloudFormation stack, paste its ARN, and connect your S3 buckets without an access key.

Owner

An IAM role is the safest way to connect AWS S3. You create a role in your own AWS account that quickS3 is allowed to use, and paste its ARN into quickS3. There’s no access key to create, paste, store, or rotate, and you can cut quickS3 off at any time by deleting the role.

quickS3 does most of the work: it writes the role for you as a CloudFormation template, already filled in for your organisation. You open it in AWS, tick one box, and copy one value back. Allow about ten minutes.

Before you start

  • You need to be an Owner in quickS3. Only Owners can add connections.
  • You need to be signed in to the AWS account that owns your buckets, as someone allowed to create IAM roles and CloudFormation stacks. An administrator of the account can do both.
  • Know which region your buckets are in. It’s shown next to each bucket in the S3 console, for example eu-west-3 for Paris. Buckets in several regions need one connection per region.

The screenshots below connect a bucket called quicks3-docs-team-files in Sydney (ap-southeast-2). Use your own names and region.

1. Start a new connection in quickS3

Open Connections, select New connection, and pick AWS S3. If this is your organisation’s first connection, the list of providers is already on screen.

Choose a storage provider panel asking Where are your buckets?, with AWS S3 first in a grid of eight providers.
Pick AWS S3, even if your buckets are in a region far from you.

Then fill in the top of the form:

  1. Name: what people will see in quickS3, like Team files.
  2. How quickS3 signs in to AWS: choose Connect with an IAM role (recommended).
  3. Endpoint: https://s3.<region>.amazonaws.com, with your buckets’ region. In Sydney, that’s https://s3.ap-southeast-2.amazonaws.com.
  4. Region: the same region code, like ap-southeast-2. Don’t leave it empty, or AWS will reject quickS3’s requests.
  5. Bucket scopes (optional but recommended): the names of the buckets quickS3 may reach, separated by commas. The role will then cover only these buckets. Leave it empty and the role covers every bucket in the account.
Connect AWS S3 form with Name set to Team files, Provider AWS S3, Connect with an IAM role (recommended) selected, Endpoint https://s3.ap-southeast-2.amazonaws.com, Region ap-southeast-2, and Bucket scopes quicks3-docs-team-files.
The endpoint and region must match where your buckets live.

2. Choose what quickS3 may do

Below the form, Create the role in AWS sets the most quickS3 itself can ever do in these buckets:

  • View and download: browsing, previews, and downloads only.
  • View, download and upload: adds uploads and new folders.
  • View, download, upload and delete: adds deleting. Moving and renaming files need this too.

Keep Let quickS3 set up CORS for browser uploads ticked unless your team manages bucket CORS rules itself. It lets quickS3 add the rule browsers need to upload straight to S3. It has no effect with View and download.

Roles in quickS3 still decide what each person can do. This choice is the ceiling for everyone, so pick the widest access anyone will need.

Create the role in AWS section: three access levels with View, download, upload and delete selected, the CORS checkbox ticked, Open in AWS CloudFormation and Download CloudFormation template buttons, a collapsed Or create the role by hand section, and an empty Role ARN field.
Keep this tab open: you’ll paste the role ARN here at the end.

3. Create the role in AWS

Select Open in AWS CloudFormation. AWS opens in a new tab, on a Quick create stack page that already holds quickS3’s template and your choices. If you’re signed in to several AWS accounts, pick the one that owns your buckets.

Check the Parameters. They come from quickS3, so normally there’s nothing to change:

  • AccessLevel and ManageCors match what you chose in step 2.
  • BucketNames lists your bucket scopes, or * for every bucket.
  • ExternalId and QuickS3PrincipalArn tie the role to your quickS3 organisation. Don’t change them, or quickS3 won’t be able to use the role.
  • RoleName is quickS3. Change it only if a role with that name already exists in the account.
CloudFormation Parameters section: AccessLevel full, BucketNames quicks3-docs-team-files, ExternalId filled in by quickS3, ManageCors yes, QuickS3PrincipalArn filled in by quickS3, and RoleName quickS3.
Your external ID and quickS3’s principal are filled in for you. They’re hidden here.

Scroll to the bottom of the page. Under Capabilities, tick I acknowledge that AWS CloudFormation might create IAM resources with customised names, then select Create stack.

CloudFormation Capabilities box saying the template requires AWS::IAM::Role, with the acknowledgement checkbox ticked, and the Cancel, Create changeset, and Create stack buttons.
AWS asks for this tick on any template that creates an IAM role.

The stack takes under a minute. When its status reads CREATE_COMPLETE (refresh the Events tab if it doesn’t change), open the Outputs tab and copy the RoleArn value. It looks like arn:aws:iam::123456789012:role/quickS3.

quickS3-access stack on the Outputs tab, with one output: RoleArn arn:aws:iam::123456789012:role/quickS3, described as Paste this into quickS3.
The number in the middle is your AWS account ID.

If there’s no Open in AWS CloudFormation button

Select Download CloudFormation template instead. In the AWS console, open CloudFormation, select Create stack, then With new resources (standard), choose Upload a template file, and pick the file. The parameters are already filled in, so continue as above: tick the acknowledgement, create the stack, and copy RoleArn from Outputs.

4. Paste the role ARN and connect

Back in quickS3, paste the ARN into Role ARN and select Connect provider.

Role ARN field holding arn:aws:iam::123456789012:role/quickS3, above the Connect provider and Cancel buttons.
quickS3 tries the role as soon as you connect.

quickS3 uses the role straight away. When it works, you see Connection added and verified, and the new connection lists its IAM role instead of an access key.

Connection added and verified message with Open your buckets and Test again buttons, above the Team files AWS S3 connection showing its slug, IAM role ARN, endpoint, region, bucket scopes, and upload limit.
If something’s wrong, the message says what to fix. See fixing a role connection.

5. Check it works

Select Open your buckets and open your bucket. You should see its folders and files. Try an upload to check that uploads work too.

The quicks3-docs-team-files bucket open in quickS3, with Upload, New folder, Share folder, and Request files buttons, listing three folders and two files.
Everyone in your organisation now sees the buckets their quickS3 roles allow.

Next, decide who can reach these buckets: see how access works.

Create the role by hand

If your company doesn’t use CloudFormation, open Or create the role by hand in quickS3. It shows everything you need to copy:

  1. In IAM, create a role. Choose AWS account, then Another AWS account, and enter the quickS3 account ID.
  2. Tick Require external ID and paste your External ID.
  3. Give the role the Permissions policy quickS3 shows.
  4. Once the role exists, open its Trust relationships tab and replace the policy with the Trust policy quickS3 shows. It lets in only quickS3’s own sign-in, not the whole quickS3 account.
  5. In the role’s summary, set Maximum session duration to 1 hour or more.
  6. Copy the role’s ARN from the top of its page, and continue with step 4.

Changing what quickS3 can do later

To change the access level or the buckets, update the role, then the connection:

  1. In CloudFormation, open the quickS3-access stack, select Update stack, then Make a direct update, and keep the current template.
  2. Change AccessLevel, BucketNames, or ManageCors, and finish the update.
  3. In quickS3, edit the connection so its Bucket scopes match the new bucket list.

Taking quickS3’s access away

Delete the quickS3-access stack in CloudFormation. That deletes the role, and quickS3 can’t reach your buckets from that moment. Then delete the connection in quickS3 so people don’t see a broken connection.

Your external ID

Every quickS3 organisation gets its own external ID, made by quickS3. The role only works when quickS3 presents it, so another quickS3 customer can’t use your role even if they learn its ARN. You can’t choose it, and it doesn’t change. Only Owners can see it.

quickS3 uses the role for one hour at a time and renews it before it runs out. Download and upload addresses it hands to your browser stop working when that hour ends, so they last at most an hour, and often a little less.

Share links, file requests, and shared folders aren’t cut short. They point at quickS3, which makes a fresh address each time someone opens one, so they last as long as you chose.

Switching an existing connection to a role

Edit the connection, choose Connect with an IAM role, follow steps 2 to 4, and select Update connection. quickS3 deletes the stored access key when you save. Then deactivate and delete the old key in AWS.

Fixing a role connection

  • “AWS did not let quickS3 use this role.” The role’s trust policy doesn’t name quickS3, or the external ID in it doesn’t match yours exactly. If you used CloudFormation, check that you didn’t change ExternalId or QuickS3PrincipalArn. Otherwise, copy both again from quickS3.
  • “AWS did not accept this role ARN.” The ARN has a typo. Copy it again from the stack’s Outputs tab or the role’s page in IAM.
  • “The role’s maximum session duration is shorter than one hour.” Edit the role in IAM and set it to 1 hour or more. The CloudFormation template sets it for you.
  • “quickS3 can use the role, but the role is not allowed to reach your buckets.” The permissions policy is missing or names other buckets. Update the stack’s BucketNames, or attach the policy quickS3 shows.
  • “quickS3 can use the role, but the role cannot list your buckets.” Type the bucket names into Bucket scopes, or update the stack with BucketNames set to *.
  • The stack fails because the role already exists. A role called quickS3 is already in the account. Delete the failed stack and create it again with another RoleName, like quickS3-team-files.

Failed attempts to use a role appear in the audit log as IAM role sign-in failed.