diff --git a/CHANGELOG.md b/CHANGELOG.md index 11f2007..8428605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Proj extension, license, asset paths ([#12](https://github.com/stactools-packages/threedep/pull/12)) - GPKG path ([#13](https://github.com/stactools-packages/threedep/pull/13)) +- AWS access to the sources ([#17](https://github.com/stactools-packages/threedep/pull/17)) ## v0.2.0 diff --git a/src/stactools/threedep/utils.py b/src/stactools/threedep/utils.py index da0acf5..9036738 100644 --- a/src/stactools/threedep/utils.py +++ b/src/stactools/threedep/utils.py @@ -3,6 +3,8 @@ from typing import List, Optional import boto3 +from botocore import UNSIGNED +from botocore.config import Config from stactools.threedep import utils from stactools.threedep.constants import AWS_BUCKET, AWS_PREFIX, USGS_FTP_SERVER @@ -32,7 +34,7 @@ def _fetch_ids_from_usgs_ftp(product: str) -> List[str]: def _fetch_ids_from_aws(product: str) -> List[str]: path = os.path.dirname(utils.path(product, "")) prefix = os.path.join(AWS_PREFIX, path) - client = boto3.client("s3") + client = boto3.client("s3", config=Config(signature_version=UNSIGNED)) paginator = client.get_paginator("list_objects_v2") page_iterator = paginator.paginate(Bucket=AWS_BUCKET, Prefix=prefix) filtered_iterator = page_iterator.search("Contents[?ends_with(Key, `.xml`)].Key")