By using AWS re:Post, you agree to the Terms of Use

Rate limiting in AWS beanstalk


Hi, I have a Java beanstalk, and I want to have 1 request per sec rate limiting on all of my end points. I am following and I created a .platform/nginx/conf.d/proxy.conf with following content

client_max_body_size 10M;

http {
    limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
    server {
        location / {
            limit_req zone=one;
            limit_req_dry_run on;

but rate limiting is not working. What is wrong?

  • Will you please elaborate more on how did you configure your java application using Elastic Beanstalk?

  • nothing fancy, used a proc file and i run the jar

asked 9 months ago145 views
2 Answers

The root location ("location /") is already defined by the existing file:


To replace the root location you need to replace the entire nginx configuration using the file:

answered 8 months ago

Have you considered using AWS WAF for the rate limiting it may meet your needs. You can create rules that rate-limit traffic from specific user-agents, from specific IP addresses, or that contain particular request headers.

answered 9 months 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.

Guidelines for Answering Questions