Skip to content

Commit 24b1f29

Browse files
committed
feat(hip-3-pusher): Use AWS client env vars
1 parent 9c1125e commit 24b1f29

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

apps/hip-3-pusher/src/pusher/config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55

66
class KMSConfig(BaseModel):
77
enable_kms: bool
8-
aws_region_name: str
98
key_path: str
10-
access_key_id_path: str
11-
secret_access_key_path: str
129

1310

1411
class LazerConfig(BaseModel):

apps/hip-3-pusher/src/pusher/kms_signer.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,9 @@ def __init__(self, config: Config):
3737
logger.info("KMSSigner address: {}", self.address)
3838

3939
def _init_client(self, config):
40-
aws_region_name = config.kms.aws_region_name
41-
access_key_id_path = config.kms.access_key_id_path
42-
access_key_id = open(access_key_id_path, "r").read().strip()
43-
secret_access_key_path = config.kms.secret_access_key_path
44-
secret_access_key = open(secret_access_key_path, "r").read().strip()
45-
40+
# AWS_REGION, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY should be set as environment variables
4641
return boto3.client(
4742
"kms",
48-
region_name=aws_region_name,
49-
aws_access_key_id=access_key_id,
50-
aws_secret_access_key=secret_access_key,
5143
# can specify an endpoint for e.g. LocalStack
5244
# endpoint_url="http://localhost:4566"
5345
)

0 commit comments

Comments
 (0)