AWS Lambda with sentinelhub-py



i try to implement the python-api into an aws worklfow containing aws-lambda for further processing of images and fis queries. For now, everything works like it would be on my local machine. I like the simple use of the API and want to integrate it optimally into an AWS lambda.

Do you know if there are any data transfer costs out of the aws infrastructure (because sentinel-2 images are in a s3 bucket). I understand, that the fis-request is a url.requests and there will be data transfer in and out, but will it also affect the retrieve of wms/wcs functions? Or is it rather recommended to use rasterio/boto3 and retrieve data directly from aws s3:bucket?


Data transfer costs in AWS are complicated stuff :slight_smile:
@jflasher might help us with this.
Generally I think it is along the following lines:

  • Data transfer in is generally free of charge - so data coming from Sentinel Hub FIS, WMS and WCS should not impact AWS costs
  • When you go directly to Sentinel-2 images stored on S3, you will certainly pay for GET requests as the bucket is configured as “Requester pays” (see this post)
  • You can configure you Lambdas to run in EU-1 region (Frankfurt), in which case there will be no egress costs. If you have them running in some other region, you will pay for that as well.

If I am not mistaken (and note that I am probably a bit biased), in terms of AWS costs using Sentinel Hub APIs will be most cost efficient. (you will have to subscribe to the API obviously).

In practice though you will probably find out only when you will be running it for a week


I don’t think there is anything else I can add here, Grega mentioned all the major points around egress and GET requests and API usage.