Skip to content

Commit 892336a

Browse files
authored
fix: override signing config for s3 control (#1188)
1 parent cef72c5 commit 892336a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"id": "8147aee6-9f81-40cc-965e-9867044439b9",
3+
"type": "bugfix",
4+
"description": "Add missing `x-amz-content-sha256` header for SigV4 requests.",
5+
"issues": [
6+
"awslabs/aws-sdk-kotlin#1187"
7+
],
8+
"module": "s3control"
9+
}

codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3SigningConfig.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class S3SigningConfig : KotlinIntegration {
2424
override val order: Byte
2525
get() = 127
2626

27-
override fun enabledForService(model: Model, settings: KotlinSettings) =
28-
model.expectShape<ServiceShape>(settings.service).isS3
27+
override fun enabledForService(model: Model, settings: KotlinSettings): Boolean {
28+
val service = model.expectShape<ServiceShape>(settings.service)
29+
return (service.isS3 || service.isS3Control)
30+
}
2931

3032
override val sectionWriters: List<SectionWriterBinding>
3133
get() = listOf(

0 commit comments

Comments
 (0)