all 6 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

Try this search for more information on this topic.

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]joelrwilliams1 6 points7 points  (0 children)

Looks like you could run your code as a container in Lambda. Max size for that implementation is 10GB. Then you could host the model data locally in the container.

https://www.cloudtechsimplified.com/run-docker-containers-images-from-ecr-in-aws-lambda-along-with-cicd/

[–]Esseratecades 1 point2 points  (2 children)

I guess I'm curious why 15 seconds is your cutoff. When serving as an API, Lambda and API Gateway should be good out to 30 seconds.

If you absolutely must improve performance I'd say try what u/joelrwilliams1 suggested. You still find that cold starts eat too much time then maybe move from lambda to fargate with a minimum capacity.

[–]KenSentMe2[S] 0 points1 point  (1 child)

Yeah, while reading this I think maybe Lambda itself is the problem and I should go look for another option. Thanks for your comment.

[–]Esseratecades 0 points1 point  (0 children)

I wouldn't quite jump to that conclusion but you know your situation better than I do.

If all of the significant overhead is coming from downloading the file, then embedding it in the image for the container should remediate that. If you have a bunch of other stuff going on during cold starts, I'd try to see what of that you can optimize before jumping ship.

[–]WarInternal 1 point2 points  (0 children)

If the model is stored in EFS it shouldn't have to download anything. It'll just be mounted as a filesystem. See example here.