I am trying to download Sentinel 2 data from AWS S3 buckets. While for version 3.4.4 this goes ok, for higher versions of sentinelhub this does not work, as the ‘awstilerequest’ method is not found.
While in the past version 3.4.4 was sufficient, for 2022 data this provides specific errors. Namely, due to a sentinel-product change to v4.0 the metadata files (in the qi folder) are no longer stored as gml files, but as .jp2 files. As sentinelhub 3.4.4 does not download these metadatafiles, I require sentinelhub 3.5.0. Unfortunately when installing sentinelhub > 3.5.0 I am unable to use the AwsTileRequest method…
in sentinelhub-py 3.5 we changed the structure of the package, so that less dependencies were installed in the base package. The AWS extension was part of the restructuring, which is why it no longer works.
In order to install AWS functionalities in later sentinelhub-py versions you must install it with the [AWS] extra, so pip install sentinelhub[AWS]. This only installs some additional dependencies (boto3 and botocore) so if you already have those installed you can skip this step.
All AWS functionalities are now imported directly from the sentinelhub.aws module, where you’ll also find AwsTileRequest.
# from sentinelhub import AwsTileRequest does not work since 3.5
from sentinelhub.aws import AwsTileRequest
Thank you for your quick response. It solves 1 part of the problem, but not the other…
Specifically, with Sentinelhub 3.8 installed, I still get the error that it cannot download the metafiles
→ “…/sentinelhub/download/client.py:128: SHRuntimeWarning: File in location s3://sentinel-s2-l1c/tiles/31/U/FU/2022/12/11/0/qi/$$$$$$$$$$ is missing”
with file $$$$$$$$$$ being either
As far as I understood, product-version 4.0 does not use the ‘gml’ format for these metafiles, but instead uses ‘.jp2’ (see nr 2 at Open Access Hub )…