Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(s3-request-presigner): enable overriding hoistable headers #6535

Merged
merged 3 commits into from
Oct 1, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants