Scan one S3 bucket, or an S3-compatible bucket, with list and read access only.
What it scans
Current objects in one bucket, optionally limited to a literal key prefix.
| Service | Supported on |
|---|---|
| Amazon S3 (approved public AWS endpoints) | Customer-run and hosted agents |
S3-compatible services through a custom HTTPS endpoint_url, such as MinIO, Backblaze B2 and Wasabi |
Customer-run agents only |
A compatible service must support HeadBucket, ListObjectsV2 and GetObject with range reads. Test your service with a small prefix first.
What you need
| Requirement | Details |
|---|---|
| Agent | An agent |
| Bucket | The bucket name and region |
| Access | List and read access to the bucket |
| Compatible services | The provider's S3 API endpoint and S3 key pair; use that endpoint, not a console URL or a public download URL |
Step 1: Grant list and read access
- In AWS IAM → Policies → Create policy → JSON, paste this policy.
- Replace
example-scan-bucketandreports/to match your bucket and prefix. - Name the policy
MyrikeepReadReports. No write or delete permission is needed.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BucketProbeAndList",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::example-scan-bucket"
},
{
"Sid": "ReadSelectedPrefix",
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example-scan-bucket/reports/*"
}
]
}
| Statement | Grants | Covers |
|---|---|---|
BucketProbeAndList |
s3:ListBucket |
Object names in the whole bucket |
ReadSelectedPrefix |
s3:GetObject |
Object content under reports/ only |
- Set the same prefix in the console as well.
- For a whole bucket, change the object resource to
arn:aws:s3:::example-scan-bucket/*. - To isolate both names and content, scan a dedicated bucket.
Why ListBucket has no prefix condition
This is the list/read policy the current connector needs. It probes the bucket with HeadBucket before listing, and a prefix condition on ListBucket blocks that probe. Listing permission therefore covers object names in the bucket, while object content access stays restricted to reports/. See HeadBucket permissions.
Encrypted objects (SSE-KMS) and compatible providers
SSE-KMS objects may also require kms:Decrypt on the exact KMS key, with its key policy allowing the scan identity. Do not add broad KMS access.
Compatible providers use their own bucket and key permissions. Apply equivalent list and read restrictions there.
Step 2: Choose keys or workload identity
| Option | Best for | Setup |
|---|---|---|
| Workload identity | AWS hosts with an instance or task role | No manual key renewal |
| Access keys | Any host, and S3-compatible services | A dedicated identity with this policy only |
Workload identity (AWS):
- Attach this policy to the agent's instance/task role in IAM → Roles → select role → Add permissions.
- In Myrikeep, select S3/Azure workload identity and leave Credential name empty.
- The agent uses boto3's credential chain on its host. The role must be accessible inside the container.
Hosted workload identity needs an operator's explicit opt-in.
Access keys:
- Create a dedicated identity in IAM → Users → Create user, without console access. Attach only this policy.
- Under Security credentials → Create access key, choose the use case that matches your host and copy the pair once.
- For compatible services, use a provider-issued S3 key pair.
Temporary AWS keys also need their session token, and they expire.
Warning: Never paste keys into connection settings.
Connection settings table
| Console field | Example | Required or optional |
|---|---|---|
| Connection name | Reports bucket |
Required; unique in workspace |
| Type | AWS S3 bucket (s3) |
Required |
| Bucket | example-scan-bucket |
Required; no s3:// |
| Prefix | reports/ |
Optional; blank scans whole bucket |
| Region | eu-west-1 |
Optional; use your bucket/provider region |
| Endpoint URL | https://minio.example.test |
Optional; HTTPS, no credentials/query/fragment |
| Agent | Storage agent |
Required; same workspace |
| Credential mode | Local credential catalog or S3/Azure workload identity | Required |
| Credential name | S3_REPORTS |
Required for catalog; empty for workload identity |
| Exclude patterns (View/edit) | *.tmp |
Optional; one glob per line |
| Enabled (connection row) | Enabled | Disable to stop new scans |
Secret file
Workload identity needs no catalog entry or secret JSON. For catalog keys, save
/srv/myrikeep/secrets/S3_REPORTS:
{"access_key_id": "<S3_ACCESS_KEY_ID>", "secret_access_key": "<S3_SECRET_ACCESS_KEY>"}
For temporary credentials, include "session_token": "<AWS_SESSION_TOKEN>".
Merge this catalog entry:
{"version": 1, "credentials": {"S3_REPORTS": {"type": "s3", "source": {"kind": "file_json", "path": "/run/secrets/S3_REPORTS"}}}}
Follow Agent credentials for file modes and mounts.
Scope, exclusions and schedules
| Setting | What it matches | Example |
|---|---|---|
| Prefix | A literal, case-sensitive key prefix; scan scope, not an IAM grant | reports/ (differs from reports) |
| Exclusion | Full keys and basenames, before content is read | *.tmp, reports/cache/*, */scratch/* |
Skip common build and cache folders. New connections skip folders that only hold downloaded or generated files, such as node_modules, Python site-packages and .venv, the Git object store and package caches. The full list is under the checkbox on the connection form. Your own excludes still apply. Credential folders such as .ssh and .aws are never skipped. Connections made before this option existed keep it off until you tick it.
See Getting started for schedule cadence.
"Who can see it" support
Sharing checks are not available for this source yet.
- Public access, bucket policies, ACLs and cross-account access are not assessed in phase 1.
- LastModified supports age review; it is not last access.
See Who can see it.
Troubleshooting
| State or error | What to do |
|---|---|
unknown |
Check agent heartbeat, assignment and current connection revision. |
missing / credential_missing |
Match alias/type and mount; for workload identity check the SDK can obtain host credentials. |
Invalid / credential_config_invalid |
Check exact JSON, modes and nonempty fields; temporary keys need a session token. |
present |
Catalog resolved, or workload credentials initialized. Bucket authorization is tested by a scan. |
source_error / cannot open S3 client for bucket |
Check bucket, region, endpoint and HeadBucket/list permission in local agent diagnostics. |
| AccessDenied / cannot list / cannot read | Check bucket policy, prefix read resource, explicit denies and KMS key permissions. |
| ExpiredToken / InvalidAccessKeyId / SignatureDoesNotMatch | Renew keys/token; check provider region, clock and endpoint. |
| Hosted source or endpoint prohibited | Use a customer-run agent for a custom/private S3 endpoint. |
| Paused / Migration paused / Disabled | Resume agent, assign and save the connection, or enable it. |
signin_required |
Applies to personal drives; S3 uses keys or workload identity. |
Limits
What it never does: discover buckets, read object version history, restore from Glacier, edit policies or write.
| Limit | Value |
|---|---|
| Listed objects | Enumeration stops with an error above 1,000,000; narrow the prefix |
| Folder markers | Skipped |
| Sampling | Agent sampling limits can be lower; not all bytes are classified |
Inspect Coverage after each scan.
File formats
Modern Office/PDF text and common text formats have parsers; other files use strings-only checks. Text in images and scanned PDFs needs OCR, an optional premium feature a workspace owner enables. It runs inside your agent with the OCR agent image.