In the following stac server endpoint https://earth-search.aws.element84.com/v1/collections/sentinel-2-l1c
There is a bug in Sentinel 2 L1C stac items assets hrefs for dates before july 2023.
For example for date “2023/07/07”, tile “MGRS-21HUB” and asset “blue” the s3 href should be like this:
s3://sentinel-s2-l1c/tiles/21/H/UB/2023/7/7/0/B02.jp2
but actually is like this
s3://sentinel-s2-l2a/tiles/21/H/UB/2023/7/7/0/B02.jp2
here is a code snippet for checking it:
from pystac_client import Client
STAC_URL = "https://earth-search.aws.element84.com/v1"
stac_client = Client.open(STAC_URL)
stac_client.add_conforms_to("ITEM_SEARCH")
l1c_items = stac_client.search(
collections=["sentinel-2-l1c"],
bbox=(-58.6069,-34.4038,-58.4982,-34.3136),
datetime="2023-07-07/2023-07-10",
max_items=1,
)
l1c_items_list = list(l1c_items.items_as_dicts())
print("tile:", l1c_items_list[0]["properties"]["grid:code"])
print("href:", l1c_items_list[0]["assets"]["blue"]["href"], "\n")
