How to increase body request size.

0

Hello folks, I´m getting this trouble with my requests to this API deployed on AWS EC2 instance.

The page was not displayed because the request entity is too large.

And I suppose that the problem should be on AWS since I can send the same file size through this API running by locally on my PC. Therefore here is my question for you: How could I increase this request size in order to be able to upload biggest files to my API deployed on AWS? Thanks in advance, Regards.

posta 10 mesi fa482 visualizzazioni
1 Risposta
1

You don't mention API Gateway specifically in your question or tags, but I know that it has a maximum payload size of 10MB and I'm wondering if that has anything to do with what you're seeing?

This limit, and others, are documented here https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html

profile picture
ESPERTO
Steve_M
con risposta 10 mesi fa
  • Hello Steve, thanks for your soon reply and concern. I´m aware of that, but that isn´t the real problem in here. I´ve continued reviewing the question and I´ve discovered what configuring the IIS maxRequestSize I´m able to send largest files, so that AWS isn´t the problem in here. Now I suppose that my question could be: How to handle Elastic Beanstalk or other service, to set the custom value for my IIS into the EC2 instance once deploy is done, even when Load Balancer creates/raises a new EC2 instance? Anyway thanks my friend, glad to receive help you from yall, Regards.

  • I can't give advice on Windows, but it sounds like something you should be able to do in the User Data associated with the EC2 (or, more correctly, the Launch Template).

    In Linux I'd be using User Data to re-write the relevant section of the webserver config to bump up the limit. Not sure how to do this with IIS in Windows, but this may help https://learn.microsoft.com/en-us/answers/questions/946210/413-request-entity-too-large

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande