Skip to content

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Sep 30, 2024

This requires codegen update to include smithy-lang/smithy-typescript#1421

This adds the hoistableHeaders configuration to s3 presigning.

This change enables the following and potentially other use cases while maintaining backwards compatibility:

const params = {
  Key: "...",
  Bucket: "...",
  ServerSideEncryption: "aws:kms",
  SSEKMSKeyId: "arn:aws:kms:us-west-2:0000:key/abcd-1234-abcd",
};
const s3Client = new S3Client();
const command = new PutObjectCommand(params);

const preSignedUrl =
  (await getSignedUrl(s3Client, command, {
    hoistableHeaders: new Set(["x-amz-server-side-encryption", "x-amz-server-side-encryption-aws-kms-key-id"]),
  }));

context: #1701

@kuhe kuhe requested a review from a team as a code owner September 30, 2024 16:44
@kuhe kuhe changed the title fix/s3 sign fix(s3-request-presigner): enable overriding hoistable headers Sep 30, 2024
@kuhe kuhe requested a review from a team as a code owner September 30, 2024 20:45
@kuhe kuhe merged commit 3c2e59c into aws:main Oct 1, 2024
4 checks passed
@kuhe kuhe deleted the fix/s3-sign branch October 1, 2024 15:49
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants