Class S3TreeRewriter

java.lang.Object
software.amazon.smithy.rulesengine.aws.s3.S3TreeRewriter

public final class S3TreeRewriter extends Object
Rewrites S3 endpoint rules to create a dramatically smaller and more efficient BDD.

This is a BDD pre-processing transform that makes the decision tree larger but enables dramatically better BDD compilation. It solves the "SSA Trap" problem where semantically identical operations appear as syntactically different expressions.

This class composes three separate transforms:

  1. S3AzCanonicalizerTransform - Canonicalizes AZ extraction: substring(Bucket, N, M)split(Bucket, "--")[1]
  2. S3RegionUnifierTransform - Unifies region references: Region/bucketArn#region_signing_region/_effective_region
  3. S3ExpressEndpointTransform - Canonicalizes S3Express endpoints: FIPS/DualStack URL variants → ITE-computed segments

Each transform is independent and can be applied separately if needed.

  • Method Details

    • transform

      public static EndpointRuleSet transform(EndpointRuleSet ruleSet)
      Transforms the given endpoint rule set by applying all S3 canonicalization transforms.
      Parameters:
      ruleSet - Rules to transform.
      Returns:
      the transformed rule set.