[AWS] version of sentinelhub ==3.8

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…

Hi @j.timmermans
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

Dear Ziga

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
MSK_DEFECT_B04.gml
MSK_DETFOO_B04.gml
MSK_NODATA_B04.gml
MSK_SATURA_B04.gml
MSK_TECQUA_B04.gml

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 )…

I checked it out and as you say, the line-endings don’t match up.
There has been an update, which we were not aware of, and we’ll release a patch in the next version of sentinelhub-py.

Dear Ziga

thank you very much. Can you provide me with an indication when this new version will be available?
cheers
Joris

Hi, sorry for the late reply.
The issue turned out to be much trickier than anticipated. After many discussions we decided we will not maintain the .aws module of sentinelhub-py in the near future.

In order to help our users, we updated the AWS notebook with a generic workaround for downloading tiles. Here the user has much more control and can process cases where the .aws module fails.