I would like to use AWS Lambda (Python) for Image (svs) pre-processing (create tiles ect). Unfortunately the images are around 1 GB and wont fit on /tmp (512MB). Hence, I was hoping to load the images either directly into RAM through something like:
s3_response_object = s3_client.get_object(Bucket=bucket, Key=key)
object_content = s3_response_object['Body'].read()
inmemoryfile = io.BytesIO(object_content)
Image.open(inmemoryfile)
or download a picture directly to ramfs or something similar:
from memory_tempfile import MemoryTempfile
import memory_tempfile
also only 1 out of 10 level is needed in the svs file. Hence, if there is a way to only read specific information from the file from a s3 bucket - that would be great.
thanks