Skip to content

Commit

Permalink
chore(middleware-sdk-s3): unset SessionMode default value (#6860)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Jan 31, 2025
1 parent 78ff81c commit d98e8ff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ describe("middleware-s3-express", () => {
};

describe(S3.name, () => {
it("should not send the x-amz-create-session-mode header", async () => {
const client = new S3({ region: "us-west-2", s3ExpressIdentityProvider });

requireRequestsFrom(client).toMatch({
headers: {
"x-amz-create-session-mode": /undefined/,
},
});

await client.getObject({
Bucket: "aws-sdk-js-v3-test--usw2-az1--x-s3",
Key: "1",
});

expect.hasAssertions();
});

it("should default to CRC32 checksum when the request requires a checksum and none is specified", async () => {
const client = new S3({ region: "us-west-2", s3ExpressIdentityProvider });

Expand Down
1 change: 0 additions & 1 deletion packages/middleware-sdk-s3/src/s3Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export const resolveS3Config = <T>(
s3ClientProvider().send(
new CreateSessionCommandCtor({
Bucket: key,
SessionMode: "ReadWrite",
})
)
),
Expand Down

0 comments on commit d98e8ff

Please sign in to comment.