From 978f8eba2d338b5026786b63a67fd4d96659b23f Mon Sep 17 00:00:00 2001 From: Graham Savage Date: Thu, 26 Nov 2026 08:59:46 +0000 Subject: [PATCH 1/2] docs(cloud capture): describe a bucket as one artifact, empty or not The Kosli CLI is changing how `kosli snapshot s3` reports a bucket, and Cloud Capture snapshots buckets through that command. An S3 snapshot will always report exactly one artifact named after the bucket, where a single-object bucket used to be named after the object. A bucket with nothing to fingerprint, whether it is empty or none of its objects carries a SHA256 checksum, will be reported with the fingerprint of an empty directory instead of failing or reporting no artifact. Update the "What to expect" list for S3 buckets to say so. This must not be published before the CLI release that carries the change. Co-Authored-By: Claude Fable 5.2 --- administration/cloud_capture/getting_started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/administration/cloud_capture/getting_started.md b/administration/cloud_capture/getting_started.md index 579601f..35588e6 100644 --- a/administration/cloud_capture/getting_started.md +++ b/administration/cloud_capture/getting_started.md @@ -229,9 +229,11 @@ S3 is opt-in, bucket by bucket. An account usually holds many buckets you would What to expect: - **Each bucket is its own environment**, of type S3, named by your [environment name template](#environment-names) with the bucket name as `{resource}`. +- **Each bucket reports exactly one artifact, named after the bucket.** A bucket holding several objects is fingerprinted as a directory, and a bucket holding a single object is fingerprinted as that file. Either way the artifact carries the bucket's name, not the object's. +- **An empty bucket is captured, not failed.** It reports one artifact, named after the bucket, with the fingerprint of an empty directory: `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`. Every empty bucket therefore shares that fingerprint. - **A bucket needs both the tag and the permission.** A bucket that carries the opt-in tag but is not named in the stack fails its snapshot on every scan, with an access denied error. A bucket that is named in the stack but not tagged is left alone. - **Skipping wins.** A bucket that carries an opt-in tag and a [skip tag](#excluding-resources) is not captured. -- **Only objects with a SHA256 checksum are fingerprinted.** S3 stores a full-object SHA256 checksum only when the upload asks for one, for example with `aws s3api put-object --checksum-algorithm SHA256`. An object without one, or one uploaded in several parts, is left out of the fingerprint, as if the bucket did not hold it. The fingerprint therefore matches an artifact you attested from the bucket's whole content only once every object carries the checksum, and a bucket where no object does is reported as holding no artifact. +- **Only objects with a SHA256 checksum are fingerprinted.** S3 stores a full-object SHA256 checksum only when the upload asks for one, for example with `aws s3api put-object --checksum-algorithm SHA256`. An object without one, or one uploaded in several parts, is left out of the fingerprint, as if the bucket did not hold it. The fingerprint therefore matches an artifact you attested from the bucket's whole content only once every object carries the checksum, and a bucket where no object does is reported as an empty bucket. - **Buckets encrypted with a KMS key are not supported.** The role is granted no KMS permission, so a bucket whose objects use SSE-KMS fails its snapshot. S3's default encryption, SSE-S3, needs nothing more. - **Large buckets cost more and can time out.** A snapshot is one request per object, on every scan. At the default five minute frequency, a bucket of 100,000 objects is about 29 million requests a day. A bucket of more than roughly 100,000 objects may not finish in the time a snapshot is given, and then fails. Consider a longer [scan frequency](#scan-frequency) if you capture large buckets; it applies to everything Cloud Capture scans for you. - **A newly tagged bucket is picked up on a later scan**, once AWS reports the tag. Removing the tag, or the opt-in tag from your settings, stops new snapshots; the environment keeps its last snapshot and nothing is deleted. From b83024fc285b29bc40b8d79d80a3185012cd868c Mon Sep 17 00:00:00 2001 From: Graham Savage Date: Thu, 26 Nov 2026 10:30:09 +0000 Subject: [PATCH 2/2] docs(cloud capture): say what an S3 bucket's fingerprint matches Review of the new S3 bullets raised two ways a reader could be surprised by a match, or by the lack of one. A single-object bucket now carries the bucket's name, which suggests it is fingerprinted as a directory. It is still fingerprinted as the file, so it only matches an artifact attested with `--artifact-type file`. Say so where the naming is described. The empty-bucket fingerprint is the SHA256 of no input, which is also the fingerprint of any empty file. An empty bucket therefore matches an artifact attested from an empty file, possibly in an unrelated flow. State that so the match is expected rather than puzzling. Co-Authored-By: Claude Fable 5.2 --- administration/cloud_capture/getting_started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/administration/cloud_capture/getting_started.md b/administration/cloud_capture/getting_started.md index 35588e6..1b9a2a3 100644 --- a/administration/cloud_capture/getting_started.md +++ b/administration/cloud_capture/getting_started.md @@ -229,8 +229,8 @@ S3 is opt-in, bucket by bucket. An account usually holds many buckets you would What to expect: - **Each bucket is its own environment**, of type S3, named by your [environment name template](#environment-names) with the bucket name as `{resource}`. -- **Each bucket reports exactly one artifact, named after the bucket.** A bucket holding several objects is fingerprinted as a directory, and a bucket holding a single object is fingerprinted as that file. Either way the artifact carries the bucket's name, not the object's. -- **An empty bucket is captured, not failed.** It reports one artifact, named after the bucket, with the fingerprint of an empty directory: `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`. Every empty bucket therefore shares that fingerprint. +- **Each bucket reports exactly one artifact, named after the bucket.** A bucket holding several objects is fingerprinted as a directory, and a bucket holding a single object is fingerprinted as that file, so attest that file with `--artifact-type file` for the fingerprints to match. Either way the artifact carries the bucket's name, not the object's. +- **An empty bucket is captured, not failed.** It reports one artifact, named after the bucket, with the fingerprint of an empty directory: `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`. Every empty bucket therefore shares that fingerprint. It is also the fingerprint of an empty file, so an empty bucket matches any artifact attested from one. - **A bucket needs both the tag and the permission.** A bucket that carries the opt-in tag but is not named in the stack fails its snapshot on every scan, with an access denied error. A bucket that is named in the stack but not tagged is left alone. - **Skipping wins.** A bucket that carries an opt-in tag and a [skip tag](#excluding-resources) is not captured. - **Only objects with a SHA256 checksum are fingerprinted.** S3 stores a full-object SHA256 checksum only when the upload asks for one, for example with `aws s3api put-object --checksum-algorithm SHA256`. An object without one, or one uploaded in several parts, is left out of the fingerprint, as if the bucket did not hold it. The fingerprint therefore matches an artifact you attested from the bucket's whole content only once every object carries the checksum, and a bucket where no object does is reported as an empty bucket.