Sentinel-2 data is available from a public bucket located in Oregon, for more information see the AWS PDS page.
There are two ways to index this data that are briefly outlined below.
An ODC product definition for the S-2 COGs is inluded in this repo. Add this to datacube using the following command:
datacube product add products/s2_l2a.odc-product.yaml
Install the scripts required by following the instructions here like this:
pip install --extra-index-url="https://packages.dea.ga.gov.au" odc_apps_dc_tools
You should export the following environment variables:
# Tell GDAL to not sign requests for data from S3
AWS_NO_SIGN_REQUEST=true
A single STAC document can be indexed direct from S3 like this:
s3-to-dc --stac --no-sign-request \
s3://sentinel-cogs/sentinel-s2-l2a-cogs/37/M/CS/2017/10/**/S2A_37MCS_20171016_0_L2A.json s2_l2a
Or all scenes for a single MGRS code like this:
s3-to-dc --stac --no-sign-request \
"s3://sentinel-cogs/sentinel-s2-l2a-cogs/37/M/CS/**/*S2A_37MCS_20171016_0_L2A*.json" s2_l2a
If successful, you should see a message that reads something like this:
Added 634 Datasets, Failed 0 Datasets
Indexing for a region of interest can be done using the STAC API, like this:
stac-to-dc \
--catalog-href='https://earth-search.aws.element84.com/v1/' \
--bbox='25,20,35,30' \
--collections='sentinel-2-l2a' \
--datetime='2020-01-01/2020-03-31'
You can change the bounding box or datetime range to search anywhere in the world.