Object storage bucket policies
A bucket policy is an IAM-style JSON document. Attach it when you create or update a bucket, as the policy field. It decides which Thalassa users and service accounts can call which S3 actions on that bucket.
You can set the same document in the console bucket policy JSON editor.
How access is decided
An empty Statement list means the document adds no extra allow or deny rules.
{
"Version": "2012-10-17",
"Statement": []
}When the document contains statements, access is granted only by a matching Allow. Any matching Deny wins when both match the same principal, action, and resource.
A statement matches when the caller’s principal, the S3 action, and the resource ARN all match that statement.
Policy document
| Field | Required | Rules |
|---|---|---|
Version | Yes | Must be exactly 2012-10-17. |
Statement | Yes | Array of statements. May be empty. |
Statements
{
"Sid": "AllowReadObjects",
"Effect": "Allow",
"Principal": {
"Thalassa": "arn:thalassa:iam:::user/org-identity:user-subject"
},
"Action": ["s3:GetObject"],
"Resource": ["arn:thalassa:s3:::my-bucket/*"]
}| Field | Required | Rules |
|---|---|---|
Sid | No | Up to 255 characters. Letters, digits, _, and - only. |
Effect | Yes | Allow or Deny. |
Principal | Yes | At least one of Thalassa or AWS. Each value is a string or an array of strings. |
Action | Yes | One action string, or an array of action strings. At least one action. Wildcards such as s3:* are rejected. |
Resource | Yes | Array of resource ARNs. At least one. Every ARN must name this bucket. |
Condition | No | Optional IAM condition object. It is stored and forwarded to object storage. The platform does not validate condition keys. |
List every action by name. The platform rejects action wildcards, including s3:*.
Principals
Use Principal.Thalassa. The organisation identity in the ARN must be the organisation that owns the bucket.
| Who | ARN |
|---|---|
| User | arn:thalassa:iam:::user/{organisationIdentity}:{userSubject} |
| Service account | arn:thalassa:iam:::serviceaccount/{organisationIdentity}:{serviceAccountIdentity} |
| Any principal | * |
| Any user in the organisation | arn:thalassa:iam:::user/{organisationIdentity}:* |
| Any service account in the organisation | arn:thalassa:iam:::serviceaccount/{organisationIdentity}:* |
A named user must already be a member of the organisation. A named service account must already exist in the organisation.
Principal.Thalassa accepts one ARN as a string, or several ARNs as an array. The same ARN shapes with an arn:aws:iam::: prefix are accepted and treated as the Thalassa principal.
* matches any principal. Use a named ARN, or an organisation wildcard, when the statement should cover a smaller set of callers.
Resources
Resource ARNs must use this bucket’s name. arn:aws:s3::: is accepted and treated the same as arn:thalassa:s3:::.
| Target | ARN | Typical actions |
|---|---|---|
| The bucket | arn:thalassa:s3:::my-bucket | s3:ListBucket, s3:GetBucketVersioning |
| Every object | arn:thalassa:s3:::my-bucket/* | s3:GetObject, s3:PutObject, s3:DeleteObject |
| One object | arn:thalassa:s3:::my-bucket/folder/file.txt | Object actions on that key |
| A prefix | arn:thalassa:s3:::my-bucket/logs/* | Object actions under that prefix |
Listing a bucket and reading its objects are different resources. Grant both when a caller needs to list and download.
Object keys
Object keys may be at most 1024 bytes. Spaces and Unicode are allowed. Keys must not contain .., //, a leading or trailing /, or control characters.
Actions you can grant
Objects
| Purpose | Actions |
|---|---|
| Read | s3:GetObject, s3:GetObjectVersion |
| Write | s3:PutObject, s3:RestoreObject |
| Delete | s3:DeleteObject, s3:DeleteObjectVersion |
| ACL | s3:GetObjectAcl, s3:GetObjectVersionAcl, s3:PutObjectAcl, s3:PutObjectVersionAcl |
| Multipart upload | s3:ListMultipartUploadParts, s3:AbortMultipartUpload |
| Tagging | s3:GetObjectTagging, s3:PutObjectTagging, s3:DeleteObjectTagging, s3:GetObjectVersionTagging, s3:PutObjectVersionTagging, s3:DeleteObjectVersionTagging |
| Object lock | s3:GetObjectRetention, s3:PutObjectRetention, s3:GetObjectLegalHold, s3:PutObjectLegalHold, s3:BypassGovernanceRetention |
Bucket
| Purpose | Actions |
|---|---|
| List | s3:ListBucket, s3:ListBucketVersions, s3:ListBucketMultipartUploads, s3:ListAllMyBuckets |
| Bucket | s3:CreateBucket, s3:DeleteBucket |
| ACL | s3:GetBucketAcl, s3:PutBucketAcl |
| CORS | s3:GetBucketCORS, s3:PutBucketCORS |
| Versioning | s3:GetBucketVersioning, s3:PutBucketVersioning |
| Request payment | s3:GetBucketRequestPayment, s3:PutBucketRequestPayment |
| Lifecycle | s3:GetLifecycleConfiguration, s3:PutLifecycleConfiguration |
| Object lock configuration | s3:GetBucketObjectLockConfiguration, s3:PutBucketObjectLockConfiguration |
| Policy status | s3:GetBucketPolicyStatus |
| Public access block | s3:GetPublicAccessBlock, s3:PutPublicAccessBlock, s3:DeletePublicAccessBlock, s3:GetBucketPublicAccessBlock, s3:PutBucketPublicAccessBlock, s3:DeleteBucketPublicAccessBlock |
Actions excluded from bucket policies
These actions cannot be set in this document:
- Bucket policy management:
s3:GetBucketPolicy,s3:PutBucketPolicy,s3:DeleteBucketPolicy s3:GetBucketLocation- Website, logging, bucket tagging, notification, replication, encryption, accelerate, and torrent actions
Guides
For endpoints and SDKs, see Clients. For customer-provided encryption keys, see SSE-C.