Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion src/stactools/threedep/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
Loading