Skip to main content

Amazon S3 — Authentication

B
Written by Ben Keeling

How to create a read-only AWS access key for one S3 bucket, add it to Medialake, and understand exactly what access it grants.



​

What to expect

Amazon S3 is connected with an AWS access key that belongs to an IAM user in your own AWS account. There is no AWS sign-in or consent screen during setup. An AWS administrator creates the IAM user and its access key, a Medialake administrator saves the key in Medialake together with the bucket name and region, and from then on Medialake reads the bucket server-side with that key.

Each access key you save in Medialake points at one bucket. To sync a second bucket, save a second access key in Medialake with that bucket's name. The same AWS key can be reused for both if its policy covers both buckets.

We follow the principle of least privilege: the policy below grants read access to a single bucket, plus permission to look up its own IAM user, and nothing else. The connector only reads. It lists the bucket's folders and objects, reads object metadata, and downloads the files you choose to sync. It does not upload, overwrite, tag, move, or delete anything in your bucket, and it does not change any AWS setting.

 AWS administrator           Medialake                  AWS
      │  create IAM policy,       │                        │
      │  IAM user and access key  │                        │
      │───────────────────────────────────────────────────▶│
      │                           │                        │
 Medialake administrator          │                        │
      │  save access key, bucket  │                        │
      │  name and region          │                        │
      │──────────────────────────▶│                        │
      │                           │                        │
 Team member                      │                        │
      │  connect and choose       │                        │
      │  folders to sync          │                        │
      │──────────────────────────▶│  read-only requests,   │
      │                           │  signed with the key   │
      │                           │───────────────────────▶│

>Two integrations share the Amazon S3 name. This guide covers the Amazon S3 source, which you connect from Connections → Catalogue and which appears on the Sources tab of Administration → Integrations. The Amazon S3 entry on the Storage tab is a separate integration with different fields, and is not covered here.


​

Before you begin

You will need:

  • Permission in your AWS account to create IAM policies, IAM users, and access keys

  • The name of the bucket to sync, for example yourcompany-media

  • The region the bucket is in, for example eu-west-2

  • Administrator privileges in Medialake, to save the access key

Medialake accepts buckets in these regions: us-east-1, us-east-2, us-west-1, us-west-2, ca-central-1, sa-east-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, ap-south-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-southeast-1, and ap-southeast-2. A bucket in any other region cannot be connected.

The connector signs in with a long-term access key ID and secret access key. It has no field for temporary credentials or an IAM role, so the key must belong to an IAM user.

>Keep the secret access key private. AWS shows it only once, when the key is created. Store it in an approved password manager or secret-management system. Do not email it, paste it into a support ticket, or commit it to source control. Medialake stores the values you enter encrypted and never shows them again.


​

Step 1: Create a read-only IAM policy

Every AWS call the connector makes is covered by three permissions:

Permission

Resource

How Medialake uses it

s3:ListBucket

The bucket

Check that the key can reach the bucket, and list its folders and objects.

s3:GetObject

The objects in the bucket

Read each object's metadata, and download the files you choose to sync.

iam:GetUser

The IAM user itself

Read the name and ID of the IAM user that owns the key. Medialake uses these to identify the connection when you connect, and the connection cannot be created without them.

To create the policy:

  1. In the AWS Management Console, open IAM and create a new customer managed policy using the JSON policy editor.

  2. Paste the policy below, replacing yourcompany-media with your bucket name, 123456789012 with your AWS account ID, and medialake-s3-readonly with the name you will give the IAM user in Step 2.

  3. Give the policy a recognizable name, such as medialake-s3-readonly, and create it.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ListTheBucket",
      "Effect": "Allow",
      "Action": "s3:ListBucket",
      "Resource": "arn:aws:s3:::yourcompany-media"
    },
    {
      "Sid": "ReadObjects",
      "Effect": "Allow",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::yourcompany-media/*"
    },
    {
      "Sid": "IdentifyThisUser",
      "Effect": "Allow",
      "Action": "iam:GetUser",
      "Resource": "arn:aws:iam::123456789012:user/medialake-s3-readonly"
    }
  ]
}

Leave out every write, delete, and administrative action. Medialake does not request or use them.

Two cases need an addition on the AWS side:

  • Objects encrypted with a customer managed AWS KMS key (SSE-KMS). AWS also requires kms:Decrypt on that key before it returns the object. Grant it on the specific key only.

  • Objects in an archive storage class such as S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive. AWS does not return these until they are restored, so they cannot be synced as they are.


​

Step 2: Create an IAM user and access key

  1. In IAM, create a new user, for example medialake-s3-readonly. It does not need access to the AWS Management Console.

  2. Attach the policy from Step 1 to the user, and no other policies.

  3. Open the user's Security credentials and create an access key.

  4. Copy the Access key ID and the Secret access key straight away. AWS shows the secret only once; if it is lost, create a new key.

Using a dedicated user rather than a personal one keeps the connection independent of any individual, and makes its access easy to review and revoke.


​

Step 3: Add the access key to Medialake

You need administrator privileges in Medialake for this step.

  1. In Medialake, open Administration → Integrations from the sidebar.

  2. On the Sources tab, open the Amazon S3 integration.

  3. In the Access Keys section, click Create New Setting.

  4. In the New access key panel, give the key a Name, for example Marketing Amazon S3 bucket. Team members see this name when they connect.

  5. Under Credentials, fill in the four fields:

| Field | What to enter |

| --- | --- |

| S3 Access Key | The access key ID from Step 2, for example AKIA...EXAMPLE |

| S3 Secret Access | The secret access key from Step 2 |

| S3 Region | The region code of the bucket, for example eu-west-2. Use the code, not the region's display name. |

| S3 Bucket Name | The bucket name only, for example yourcompany-media. Do not enter an s3:// address, a URL, or an ARN. |

  1. Under Who can use it?, choose the teams that may connect with this key, or all teams.

  2. Click Save access key.

Enter every value without leading or trailing spaces. All four fields are required.


​

Step 4: Connect Amazon S3 and choose what to sync

Any team member who is allowed to connect sources can do this once the access key exists and is shared with their team.

  1. Open Connections → Catalogue from the side menu.

  2. Find Amazon S3 and click Connect.

  3. Click New Connection.

  4. Under Access key, select the access key saved in Step 3. It is listed by the name it was given.

  5. Optionally, click Test. Medialake makes a single read-only request to the bucket and reports the result (see the table below).

  6. Click Connect.

Nothing is synced automatically. Medialake lists the folders in your bucket, and you choose the ones to sync. In S3 a folder is a key prefix, such as campaigns/2026/. Each folder you select is synced together with everything beneath it.

Within a selected folder, Medialake imports objects whose file types it supports and skips empty (zero-byte) objects. The Medialake's Supported File Types for Sync and Upload article lists them.

To sync only objects last modified within a date range, click Edit next to a synced folder and set both Sync Start From and Sync End At.

The source syncs again on a schedule. Weekly is the default, and every 12 hours, daily, and monthly are also available.


​

What the Test button tells you

Message

Meaning

"The provider accepted these credentials."

AWS accepted the key and it can reach the bucket.

"These credentials look right, but the provider couldn't confirm them just now."

The bucket check failed. AWS does not say why this check fails, so the cause can be a wrong access key ID or secret, a deactivated or deleted key, a wrong bucket name, a wrong region, or a policy without s3:ListBucket on the bucket.


​

Limiting what Medialake can access

AWS enforces the policy attached to the IAM user on every request, so the policy, not the Medialake folder selection, is the real boundary:

  • Scope the policy to one bucket. The policy above names a single bucket. Medialake cannot list or read any other bucket with this key.

  • Keep the policy read-only. Without write or delete actions, even a leaked key could not change your data.

  • Use a dedicated bucket for a narrower scope. Medialake browses the bucket from its top level and checks the key against the bucket as a whole, so adding prefix conditions to s3:ListBucket stops the folder list and the Test button from working. If Medialake should see only part of your data, place that data in its own bucket.

Choosing folders in Medialake controls what is synced, but it does not narrow what the key itself can read.


​

What Medialake can and cannot do

With the policy above, Medialake can:

  • Confirm that the key can reach the bucket

  • Read the name and ID of the IAM user that owns the key

  • List the folders and objects in the bucket

  • Read object metadata, such as name, size, type, and last-modified date

  • Download the objects in the folders you select

Medialake cannot:

  • Read any bucket other than the one in the policy

  • Upload, overwrite, rename, tag, or delete objects

  • Change bucket settings, policies, or permissions

  • Create, change, or delete IAM users, policies, or keys

  • Use any AWS service other than S3, apart from looking up its own IAM user


​

Staying connected

An AWS access key does not expire on its own, and there is no token to renew. The connection keeps working until the key or its permissions change.

Medialake does not mark an Amazon S3 account as disconnected when AWS stops accepting its key. If the key is deactivated, deleted, or replaced, or the policy no longer allows an action, the account stays connected, but its syncs add nothing from the affected folders and its files fail to download until the key or the policy is fixed.

To replace the key, create a new access key in AWS and save it as a new access key in Medialake (Step 3). Then switch the connection to it: open the source's General tab, click Change Key in its Access Keys section, select the new key, and click Save.


​

Revoking access

To revoke Medialake's access from AWS, do any of the following in IAM:

  • Deactivate or delete the access key on the user's Security credentials

  • Detach the policy from the user

  • Delete the IAM user

Remove the Amazon S3 account in Medialake as well, with Remove account, if it should no longer sync. Medialake does not delete an access key that a connection still uses, so remove the connection before deleting its access key.


​

Troubleshooting

Symptom

What to check

"The selected S3 Region is invalid." when saving

Enter the region code, such as eu-west-2, not the display name. The bucket must be in one of the regions listed in Before you begin.

A field shows a required error when saving

All four fields are required. Check that none was left empty.

No access key to choose when connecting

An administrator must save one first (Step 3), and share it with your team under Who can use it?

Test says the credentials "look right" but couldn't be confirmed

Check the access key ID and secret, that the key is still active in IAM, the bucket name and region, and that the policy allows s3:ListBucket on arn:aws:s3:::yourcompany-media. If the key was deactivated or deleted, create a new key in AWS and save it in Medialake.

Connecting fails after you click Connect

Check that the policy allows iam:GetUser on the IAM user that owns the key.

No folders appear

Check s3:ListBucket, the bucket name, and the region. Medialake lists folders (prefixes); objects stored directly at the top of the bucket are not shown as folders.

An expected file is missing from a synced folder

Check that its file type is supported, that it is not empty, and that its last-modified date falls inside any date range set on the folder.

Files are listed but fail to download

Check s3:GetObject on arn:aws:s3:::yourcompany-media/. For SSE-KMS encrypted objects, also grant kms:Decrypt on the key. Archived objects must be restored first.

Syncs add nothing and files fail to download

The key may have been deactivated, deleted, or replaced, or the policy changed. Click Test on the access key, and if needed create a new key and switch the connection to it (see Staying connected).

If the issue continues, contact [email protected] with the bucket name, the region, and the error message. Do not include the secret access key.


​

Further reading


Questions about connecting Amazon S3? Contact [email protected].*

Did this answer your question?