Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deal with 6 megabytes limit in AWS lambda services?

Tags:

aws-lambda

I have a three-tier app running in AWS. The midware was written in Python Flask and stored on a Linux machine.

However, they asked me to move to AWS Lambda services. There is a limit of 6 M for the returning data function. As I´m dealing with GEOJson, sometimes it´s necessary to return up to 15 M.

Despite the AWS lambda stuff is stateless, I could provide some way to return data partitioned, but it´s problematic I think it will be necessary to generate the whole map again and again until I could fulfill all data.

Is there a better way to deal with this? I´m programming in Python.

like image 980
Mauro Assis Avatar asked Oct 19 '25 01:10

Mauro Assis


1 Answers

I'd handle this by sending the data to S3, and issuing a redirect or JSON response that points to the URL on S3 (with a temporary, expiring URL if the data should be secure). If the data's long-lived, you can just leave it there; if not, you could use S3's lifecycle rules to have the files automatically delete after 24 hours or so.

like image 78
ceejayoz Avatar answered Oct 22 '25 03:10

ceejayoz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!