Skip to content

Commit

Permalink
fix(middleware-sdk-ec2): fix presigning of boolean query param (#5278)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Sep 29, 2023
1 parent a3f0754 commit fa961c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/middleware-sdk-ec2/src/index.ts
Expand Up @@ -81,7 +81,12 @@ export function copySnapshotPresignedUrlMiddleware(options: PreviouslyResolved):
host: resolvedEndpoint.hostname,
},
query: {
...input,
// Values must be string instead of e.g. boolean
// because we need to sign the serialized form.
...Object.entries(input).reduce((acc, [k, v]) => {
acc[k] = String(v ?? "");
return acc;
}, {} as Record<string, string>),
Action: "CopySnapshot",
Version: version,
DestinationRegion: destinationRegion,
Expand Down

0 comments on commit fa961c2

Please sign in to comment.