Built‑in vs External Artifact Storage: Which Retention Policy Governs Your Backups?
0 reputation · 30 Nov 2020, 04:15 UTC
0 reputation · 30 Nov 2020, 04:15 UTC
CircleCI’s internal artifact store automatically expires items after a configurable period (default 90 days). When artifacts are uploaded to an external bucket—Amazon S3, Google Cloud Storage, or Azure Blob—there is no documented guarantee that the same expiration logic applies. The platform does not explicitly mention garbage‑collection of externally stored artifacts.
Restoring a workflow requires re‑downloading artifacts, either from CircleCI’s storage or from the external bucket. Without clear retention rules, teams risk losing critical data if the external copy is purged inadvertently or if the built‑in store expires before a re‑run.
CircleCI’s built‑in artifact store enforces its own retention period (default 90 days) and automatically deletes objects after that interval. When you upload artifacts to an external bucket (S3, GCS, or Azure Blob), CircleCI treats the bucket as a passive destination and does not apply any expiration or garbage‑collection logic to those objects.
If you rely on the default 90‑day expiration but store artifacts externally without matching lifecycle rules, the artifacts may be retained indefinitely (incurring extra cost) or deleted sooner than expected if the bucket’s lifecycle is more aggressive. Therefore, to achieve the same retention as the internal store you must configure the external bucket’s lifecycle to expire or transition objects after the desired period.
.circleci/config.yml for the store_artifacts step; note whether you specify an destination (external) or rely on the default internal store.aws s3api get-bucket-lifecycle-configuration --bucket <bucket-name>gsutil lifecycle get gs://<bucket-name>{
"Rules": [
{
"ID": "ExpireAfter90Days",
"Status": "Enabled",
"Filter": {},
"Expiration": { "Days": 90 }
}
]
}
shasum -a 256 <file>.Note: The behavior described reflects CircleCI’s documented artifact handling as of the 2024‑2025 release series. If you are using a significantly older or newer version, verify that the internal store still applies automatic expiration and that no new external‑artifact garbage‑collection features have been introduced.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.