Skip to content

Commit 0b5c556

Browse files
authored
Merge pull request #164 from MITLibraries/TIMX-540-ecs-duckdb-s3-connection
TIMX 540 - adjust AWS credential chain for ECS context
2 parents 2ba36a4 + 5b56965 commit 0b5c556

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

timdex_dataset_api/metadata.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ def _configure_duckdb_s3_secret(
161161
If a scope is provided, e.g. an S3 URI prefix like 's3://timdex', set a scope
162162
parameter in the config. Else, leave it blank.
163163
"""
164+
# install httpfs extension
165+
conn.execute(
166+
"""
167+
install httpfs;
168+
load httpfs;
169+
"""
170+
)
171+
164172
# establish scope string
165173
scope_str = f", scope '{scope}'" if scope else ""
166174

@@ -186,7 +194,6 @@ def _configure_duckdb_s3_secret(
186194
create or replace secret aws_s3_secret (
187195
type s3,
188196
provider credential_chain,
189-
chain 'sso;env;config',
190197
refresh true
191198
{scope_str}
192199
);

0 commit comments

Comments
 (0)