Skip to content

Commit fa961c2

Browse files
authored
fix(middleware-sdk-ec2): fix presigning of boolean query param (#5278)
1 parent a3f0754 commit fa961c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/middleware-sdk-ec2/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ export function copySnapshotPresignedUrlMiddleware(options: PreviouslyResolved):
8181
host: resolvedEndpoint.hostname,
8282
},
8383
query: {
84-
...input,
84+
// Values must be string instead of e.g. boolean
85+
// because we need to sign the serialized form.
86+
...Object.entries(input).reduce((acc, [k, v]) => {
87+
acc[k] = String(v ?? "");
88+
return acc;
89+
}, {} as Record<string, string>),
8590
Action: "CopySnapshot",
8691
Version: version,
8792
DestinationRegion: destinationRegion,

0 commit comments

Comments
 (0)