Storage / Bucket settings
Bucket settings
Configure public access and Block All Public Access, SSE-S3 encryption, custom domains and static websites, cross-account sharing, event notifications, CORS, lifecycle rules, versioning, object lock, size limits and deleting a bucket.
Open a bucket in the console to change its settings: public access and cross-account shares are on Permissions, CORS, lifecycle rules and event notifications on Management, custom domains on Domains, and encryption, the size limit, versioning, object lock, tags and deleting on Properties. You can manage all of these through the API, the CLI (pantech buckets update, stats, empty, cors, lifecycle, tags, object-lock, and pantech buckets objects subcommands), the official SDKs (client.ObjectStorage / client.Buckets in Go, client.objectStorage / client.buckets in JavaScript, and client.object_storage / client.buckets in Python), and Terraform (pantechdynamics_bucket supports quota_bytes, versioning, object_lock, public_prefixes, tags, cors_rules, lifecycle_rules, and default_object_lock, and data.pantechdynamics_bucket reads live size, object count, and tags).
Public access
Every bucket is private to begin with: only your access keys can read it.
On the Permissions tab, Bucket access is one of three:
- Private: only your access keys can read it.
- Public folders: anyone may read the objects whose keys start with a prefix you add, for example
public/orimages/. Everything else stays private. Up to 20 prefixes. - Public read: anyone may read every object in the bucket. The console asks you to confirm this.
With the API, these are the bucket's public_prefixes (PATCH /buckets/{bucket_id}): [] is private, ["public/", "images/"] makes those folders public, and [""] (one empty prefix, which every key starts with) is public read for the whole bucket.
Public means anyone can read those objects without a key. Nobody can list the bucket or write to it without a key, whichever you choose. Switching back to Private removes public access at once.
One object at a time
To share a single file without opening a whole folder, choose Make public on the object in the bucket's object browser. Make private takes it back, and its link stops working at once. With the API, it is PUT /buckets/{bucket_id}/objects/visibility.
Public links
Copy public URL on any public object gives a virtual-hosted link anyone can open in a browser:
https://<bucket>.s3.af-abj.pantechdynamics.com/<key>Legacy path-style public links (https://s3.af-abj.pantechdynamics.com/<bucket>/<key> and https://api.pantechdynamics.com/storage/public/<bucket_id>/<key>) continue to work.
Public access is set only through Pantech. An access key cannot change a bucket's policy or an object's ACL, so a leaked key cannot make your data public.
Block All Public Access
To prevent any bucket or object in your organization from being served anonymously, enable Block All Public Access in the console's Object Storage settings or via PATCH /object-storage/settings:
$ curl -X PATCH https://api.pantechdynamics.com/public/v1/object-storage/settings \ -H "Authorization: Bearer $PANTECH_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"block_public_access": true}'When turned on:
- Every public prefix and public object across your organization stops being served anonymously within seconds.
- Any request to set
public_prefixesor make an object public is refused withPUBLIC_ACCESS_BLOCKED. - Turning
block_public_accessback tofalserestores the public prefixes and public objects that were already configured.
Encryption
Buckets support platform-managed SSE-S3 server-side encryption (encryption: "sse_s3"), which encrypts every new object written to the bucket with AES-256 automatically. HTTPS is required.
You can choose none or sse_s3 when creating a bucket (POST /buckets) or update it in place at any time (PATCH /buckets/{bucket_id} or the bucket's Properties tab):
$ curl -X PATCH https://api.pantechdynamics.com/public/v1/buckets/$BUCKET_ID \ -H "Authorization: Bearer $PANTECH_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"encryption": "sse_s3"}'Changing a bucket's encryption setting applies to new objects written after the change; existing objects keep their current encryption state until overwritten.
Custom domains and static websites
You can serve public bucket content or a static website over your own HTTPS domain by binding a hostname and a Certificate Manager TLS certificate to a bucket.
1. Issue or import a TLS certificate for your hostname (for example assets.example.com or docs.example.com) under Certificates and note its cert_ ID.
2. Attach the domain to your bucket in the console or with POST /buckets/{bucket_id}/domains:
$ curl -X POST "https://api.pantechdynamics.com/public/v1/buckets/$BUCKET_ID/domains" \ -H "Authorization: Bearer $PANTECH_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "hostname": "docs.example.com", "certificate_id": "cert_06gk3x9tq7m2v8r4y1c5d0zp8w", "index_document": "index.html", "error_document": "404.html", "spa_mode": false, "cache_ttl_seconds": 300 }'3. Point DNS at your bucket hostname. Create a CNAME record pointing your custom hostname to <bucket>.s3.af-abj.pantechdynamics.com (in Pantech DNS or your external DNS provider).
Static website options can be set at attach time or updated later with PATCH /buckets/{bucket_id}/domains/{domain_id}:
index_document: the object served when a request hits a directory path such as/or/guide/(for exampleindex.html).error_document: the object served when a requested key does not exist (for example404.html).spa_mode: whentrue, routes that do not match an object fall back toindex_documentso client-side routers (React, Vue, Next.js static export) work cleanly.cache_ttl_seconds: response cache lifetime in seconds (0disables caching).
Use GET /buckets/{bucket_id}/domains to inspect bindings and DELETE /buckets/{bucket_id}/domains/{domain_id} to detach a domain.
Cross-account sharing
Share a bucket (or only selected key prefixes inside it) with another Pantech organization without creating or handing over S3 access keys.
Grant access with POST /buckets/{bucket_id}/shares:
$ curl -X POST "https://api.pantechdynamics.com/public/v1/buckets/$BUCKET_ID/shares" \ -H "Authorization: Bearer $PANTECH_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "grantee_organization_id": "org_06gk3x9tq7m2v8r4y1c5d0zp8w", "permissions": "read_only", "prefixes": ["exports/"], "expires_at": "2027-01-01T00:00:00Z" }'permissions:read_only,write_only, orread_write.prefixes: optional list of key prefixes the grantee may access. Omit to share the whole bucket.expires_at: optional RFC 3339 expiration time after which access ends automatically.
List active shares on a bucket with GET /buckets/{bucket_id}/shares, revoke a share immediately with DELETE /buckets/{bucket_id}/shares/{share_id}, and list buckets other organizations have shared with yours via GET /buckets/shared.
Event notifications
Subscribe a webhook or a Pantech function to object changes in a bucket, so image processing, indexing, virus scanning or downstream pipelines run automatically when files arrive or are deleted.
Create a notification rule with POST /buckets/{bucket_id}/notifications:
$ curl -X POST "https://api.pantechdynamics.com/public/v1/buckets/$BUCKET_ID/notifications" \ -H "Authorization: Bearer $PANTECH_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "name": "process-uploads", "events": ["object.created", "object.removed"], "prefix": "uploads/", "suffix": ".png", "target_type": "function", "target_id": "fn_06gk3x9tq7m2v8r4y1c5d0zp8w", "enabled": true }'events: one or both ofobject.createdandobject.removed.prefixandsuffix: optional key filters (for exampleprefix: "uploads/"andsuffix: ".png").target_typeandtarget_id: either"webhook"with awhk_ID, or"function"with afn_ID.enabled: pause or resume a rule at any time withPATCH /buckets/{bucket_id}/notifications/{notification_id}.
List rules with GET /buckets/{bucket_id}/notifications and remove them with DELETE /buckets/{bucket_id}/notifications/{notification_id}.
CORS
To let a web page upload to or download from a bucket directly in the browser, add a CORS rule on the Management tab:
- Allowed origins: the sites allowed to call the bucket, such as
https://app.example.com. - Allowed methods: any of
GET,PUT,POST,DELETEandHEAD. - Allowed headers and Exposed headers: optional.
- Max age: how long a browser may cache the answer, in seconds. It starts at 3600.
Lifecycle rules
Lifecycle rules tidy a bucket for you. On the Management tab, add a rule, optionally limited to a prefix filter (leave it empty for the whole bucket), with any of:
- Expire current objects (days): delete objects this many days after they were written. With versioning on, the current version becomes an earlier version instead of disappearing.
- Delete noncurrent versions (days): remove earlier versions this many days after they were replaced.
- Abort incomplete uploads (days): clean up multipart uploads that were started and never finished. They take up space and are billed until they are removed.
- Clean up expired object delete markers: remove delete markers that no longer hide any version.
For example, a bucket of nightly backups might expire current objects after 30 days, and delete noncurrent versions after 7.
Versioning
With Object versioning on, overwriting or deleting an object keeps the earlier version, so you can get it back. Show versions in the object browser lists them, and lets you restore a previous version as the latest or remove a delete marker to undelete a soft-deleted object. Through the API, call POST /buckets/{bucket_id}/objects/restore-version.
Earlier versions count as stored data and are billed, so pair versioning with a lifecycle rule that deletes noncurrent versions. You can turn versioning on or off at any time. Turning it off keeps the versions you already have.
Object lock
Object lock makes objects impossible to delete or overwrite until a date, which protects backups from mistakes and ransomware. It can only be chosen when the bucket is created, and it turns versioning on for good.
On a bucket with object lock you can set:
- Default retention, on the Properties tab: every new object is locked for a number of days.
- Governance: protected against ordinary deletes and overwrites until the date passes.
- Compliance: the strictest mode. Nobody can delete the object, or shorten its retention, until the date passes.
- Retention on one object, from the object browser, to lock it until a date.
- Legal hold on one object: locked with no end date, until you lift the hold.
A locked object is billed for as long as it is kept.
Size limit
A bucket's Size limit caps what it may hold. Resize bucket on the Properties tab changes it, or removes it. When the bucket is full, uploads are refused; reading, listing and deleting keep working. Your organization's own ceilings still apply: see limits.
Tags
Bucket tags are labels for your own use, such as team=payments or env=prod. Objects carry their own tags too, which lifecycle filters and your tools can use.
Empty or delete a bucket
Empty bucket deletes every object in it, including earlier versions, and keeps the bucket.
Delete bucket needs the bucket to be empty, or force to delete its objects with it (pantech buckets delete <bucket> --force). Only owners and admins can delete a bucket.
- Billing stops at once, and the bucket serves nothing from then on: its access keys and public links stop working.
- The data is erased 12 hours later, and the bucket's name can be used again after that. If you deleted the wrong bucket, open a ticket straight away.
- Locked objects are never deleted early. A bucket that holds objects still under retention cannot be deleted until the retention ends; the delete is refused with
BUCKET_RETENTION.
If your account is suspended
If your account is suspended for non-payment, your access keys stop working and public objects stop being served until the balance is paid. Your data is kept, and stored data is still billed, as volumes are. Paying the balance turns everything back on.