Skip to content

Commit

Permalink
pkgpush lambda: always generate URLs using v4 signer (#2754)
Browse files Browse the repository at this point in the history
This is required for S3 buckets using SSE-KMS.
  • Loading branch information
sir-sigurd authored Mar 24, 2022
1 parent 8acaae7 commit 0e1e4b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
!-->
## Catalog, Lambdas
* [Added] Use `quilt_summarize.json` to control Perspective menu ([#2744](https://github.com/quiltdata/quilt/pull/2744))
* [Fixed] Fix package creation in S3 buckets with SSE-KMS enabled ([#2754](https://github.com/quiltdata/quilt/pull/2754))

# 5.0.0 - 2022-03-14
## CLI
Expand Down
3 changes: 2 additions & 1 deletion lambdas/pkgpush/src/t4_lambda_pkgpush/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from http import HTTPStatus

import boto3
import botocore.client
from botocore.exceptions import ClientError
from jsonschema import Draft7Validator

Expand Down Expand Up @@ -206,7 +207,7 @@ def get_region_for_bucket(bucket: str) -> str:

@functools.lru_cache(maxsize=None)
def get_s3_client_for_region(region: str):
return boto_session.client("s3", region_name=region)
return boto_session.client("s3", region_name=region, config=botocore.client.Config(signature_version="s3v4"))

def get_client_for_bucket(bucket: str):
return get_s3_client_for_region(get_region_for_bucket(bucket))
Expand Down

0 comments on commit 0e1e4b2

Please sign in to comment.