swagger-ui-bundle.js (~1MB) file too big for hosting in AWS Lambda behind ALB
See original GitHub issueQ&A (please complete the following information)
- OS: client Windows / server: Amazon Linux 2, AWS Lambda
- Browser: all affected (it’s a server issue)
- Version: N/A
- Method of installation: via Swashbuckle.AspNetCore
- Swagger-UI version: 3.25.0
- Swagger/OpenAPI version: N/A
Describe the bug you’re encountering
This issue is related to size of the swagger-ui-bundle.js
file. Currently it’s close to 1MB which makes it not possible to host in AWS Lambda (behind AWS ALB - Application Load Balancer).
AWS ALB + AWS Lambda has a limit for files it can transfer which is set to 1MB which has been already reached when trying to serve swagger-ui-bundle.js
file from version 3.25.0
This issue is to open the discussion about how we could potentially solve it, e.g.:
- is there a chance to decrease size of
swagger-ui-bundle.js
file? - could we split this file into smaller chunks?
Expected behavior
SwaggerUI can be hosted in AWS Lambda.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:13 (3 by maintainers)
Top Results From Across the Web
swagger-ui-bundle.js too large for AWS Lambda and ALB
Tracked this down to a AWS ALB error saying the response was too big. ALB targeting Lambda limits responses to 1MB. Confirmed the...
Read more >Troubleshoot Application Load Balancer HTTP 502 errors - AWS
If the target is an AWS Lambda function, see Troubleshoot HTTP 502 errors when the target is a Lambda function in the Resolution...
Read more >Upload Large Payloads - AWS Lambda and S3 - YouTube
Check My Udemy Courses ⭐️ AWS - The Complete Guide to Build Serverless REST APIs: https://bit.ly/3zr0EyV Learn to Deploy Containers on ......
Read more >One thing is that ALB to Lambda restrictions ... - Hacker News
One thing is that ALB to Lambda restrictions suck. Lambdas have a 6mb response size. Api gateway has a 10mb response size. If...
Read more >swagger-ui-bundle.js too large for AWS Lambda a...anycodings
swagger-ui-bundle.js too large for AWS Lambda and ALB Updated to .NET Core 3.1 and the latest anycodings_swagger ver ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @webron, just wanted to follow up with you and ask if you have a plan in mind to address this issue?
Just to confirm the workaround works. Code should be like the following