I am using following code for downloading full size Sentinel file from S3
import boto3
s3_client = boto3.Session().client('s3')
response = s3_client.get_object(Bucket='sentinel-s2-l1c',
Key='tiles/7/W/FR/2018/3/31/0/B8A.jp2',
RequestPayer='requester')
response_content = response['Body'].read()
with open('./B8A.jp2', 'wb') as file:
file.write(response_content)
But I don't want to download full size image. Is there any way to download image based on latMax, longMin,LatMin and LatMax? I was using below command but it is not working since when data was made requester-payer on S3
gdal_translate --config CPL_TMPDIR temp -projwin_srs "EPSG:4326" -projwin 23.55 80.32 23.22 80.44 /vsicurl/http://sentinel-s2-l1c.s3-website.eu-central-1.amazonaws.com/tiles/43/R/EQ/2020/7/26/0/B02.jp2 /TestScript/B02.jp2
Is there any way to achieve this using Python boto?
