diff --git a/codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/SigV4AsymmetricTraitCustomization.kt b/codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/SigV4AsymmetricTraitCustomization.kt index c35b0828782..2af602566ea 100644 --- a/codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/SigV4AsymmetricTraitCustomization.kt +++ b/codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/SigV4AsymmetricTraitCustomization.kt @@ -41,6 +41,9 @@ class SigV4AsymmetricTraitCustomization : KotlinIntegration { .build(), ) + // SigV4A is added at the end because these services model SigV4A through endpoint rules instead of the service shape. + // Because of that, SigV4A can apply to any operation, and the safest thing to do is add it at the end + // and let the endpoint rules change priority as needed. val authTrait = shape.getTrait()?.let { if (it.valueSet.contains(SigV4ATrait.ID)) { it