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.

feita há 10 meses479 visualizações
1 Resposta
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
ESPECIALISTA
Steve_M
respondido há 10 meses
  • 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

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas