Skip to content

aws app runner for large files and git lfs

0

How can AWS App Runner support large files using Git LFS or other methods?

My situation is as follows:

My repository has a large file (not extremely large, around 80MB). When deploying on AWS App Runner, the file frequently fails to download properly and becomes corrupted. I tried using Git LFS to upload this large file, but I couldn't find a way for App Runner to support pulling files via Git LFS. I also tried dynamically downloading this file in the application, but it resulted in an error: less PM2 log: App [app:0] exited with code [0] via signal [SIGKILL] What should I do?

P.S. This is a small model, only 80MB, so I plan to deploy it locally.

asked 2 years ago260 views

1 Answer
0

AWS App Runner does not have native support for Git Large File Storage (LFS) or specific features for handling large files during deployment. However, there are a few approaches you can consider to address your situation:

  1. Split the large file: If possible, consider breaking down the 80MB file into smaller components that can be more easily managed and deployed.

  2. Use a separate storage service: Instead of including the large file in your repository, you could store it in a separate AWS service like Amazon S3. Then, configure your application to download the file from S3 during startup or when needed.

  3. Custom build process: You might be able to set up a custom build process that handles downloading and integrating the large file during the build phase of your App Runner deployment.

  4. Increase resource allocation: If the file download is failing due to resource constraints, you might need to increase the resources allocated to your App Runner service.

  5. Pre-build container image: Consider building a container image that includes the large file and deploying that to App Runner instead of deploying from source code.

Regarding the error you're seeing (PM2 log: App [app:0] exited with code [0] via signal [SIGKILL]), this typically indicates that your application is being terminated, possibly due to exceeding memory limits or other resource constraints. You may need to optimize your application's resource usage or increase the allocated resources in your App Runner configuration.

Since you mentioned that this is a small model intended for local deployment, you might want to reconsider if App Runner is the best service for your use case. For local deployments or applications with specific file handling requirements, you might find other AWS services like EC2, ECS, or Lambda (for smaller applications) more suitable.

If you decide to continue with App Runner, you'll need to experiment with these approaches to find the best solution for your specific situation. Remember to carefully manage your application's resource usage and consider the limitations of the service when dealing with large files or complex deployment scenarios.
Sources
AWS App Runner - Overview of Deployment Options on AWS
Welcome - AWS App Runner
AWS App Runner Features – Fully managed container application service – Amazon Web Services
What is AWS App Runner? - AWS App Runner

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.