Limiting Access for a Training Job | Tigris Object Storage Documentation

On this page

This guide shows how to create a secure, time-bound IAM policy for a model training job. The policy grants fine-grained access to specific buckets used during training—ensuring isolation between jobs and minimizing potential impact in case of a credential leak.

Use Case

This example demonstrates how to:

If the access key is compromised, the blast radius is minimal:

Example Policy: Dataset Read, Model Output Write, Time + IP Restricted

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "WikipediaReadOnly",
      "Effect": "Allow",
      "Action": ["s3:GetObject", "s3:ListBucket"],
      "Resource": [
        "arn:aws:s3:::acmeco-training-datasets-wikipedia-2025-07-01",
        "arn:aws:s3:::acmeco-training-datasets-wikipedia-2025-07-01/*"
      ]
    },
    {
      "Sid": "BaseModelsReadOnly",
      "Effect": "Allow",
      "Action": ["s3:GetObject", "s3:ListBucket"],
      "Resource": [
        "arn:aws:s3:::acmeco-base-models",
        "arn:aws:s3:::acmeco-base-models/*"
      ]
    },
    {
      "Sid": "FinetunedModelsWrite",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:ListBucket",
        "s3:PutObject",
        "s3:PutObjectAcl",
        "s3:AbortMultipartUpload",
        "s3:ListMultipartUploadParts",
        "s3:CompleteMultipartUpload"
      ],
      "Resource": [
        "arn:aws:s3:::acmeco-finetuned-models",
        "arn:aws:s3:::acmeco-finetuned-models/*"
      ],
      "Condition": {
        "DateGreaterThan": {
          "aws:CurrentTime": "2025-07-16T01:00:00Z"
        },
        "DateLessThan": {
          "aws:CurrentTime": "2025-07-16T04:00:00Z"
        },
        "IpAddress": {
          "aws:SourceIp": "203.0.113.42/32"
        }
      }
    }
  ]
}

This policy allows the training job to:

Explanation

Field Description
Action Read-only for datasets, write-only for output bucket.
Resource Limits access to only the buckets involved in this specific training job.
Condition Applies both a time window and IP address restriction.
Time Format ISO 8601 in UTC (e.g., 2025-07-16T01:00:00Z).
IpAddress Limits access to your job runner, GPU node, or secure NAT address.

Next Steps