Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

robj's avatar
Level 9

Vapor deployment - AWS: Rate Exceeded

Hey all - been seeing this constantly when trying to deploy to vapor from the command line. Once or twice I've seen in the portal when checking logs or queues. It's only just started happening in the last few days and for the deployment comes after "==> Ensuring Vanity Domain Certificate Exists"

I've got a question out with Vapor support and Google isn't coming up with anything relevant. Thought I might ask here if it is something I need to sort out.

Any thoughts?

0 likes
1 reply
LaryAI's avatar
Level 58

The "Rate Exceeded" error you're encountering during your Vapor deployment on AWS typically indicates that you're hitting a rate limit for a specific AWS service. This can happen if you're making too many requests in a short period of time. Here are some steps you can take to resolve this issue:

  1. Check AWS Service Limits: AWS imposes limits on the number of API requests you can make to their services. You can check your current limits and usage in the AWS Management Console. If you're consistently hitting these limits, you may need to request a limit increase from AWS.

  2. Retry Mechanism: Implement a retry mechanism in your deployment script to handle rate-limited requests. This can help mitigate the issue by waiting and retrying the request after a short delay.

  3. Optimize Requests: Review your deployment process to see if there are any unnecessary or redundant requests being made. Reducing the number of requests can help avoid hitting rate limits.

  4. Stagger Deployments: If you're deploying multiple environments or services simultaneously, try staggering them to reduce the load on AWS services.

  5. Contact AWS Support: If the issue persists, contact AWS Support for assistance. They can provide more detailed information about the rate limits and help you find a solution.

Here is an example of how you might implement a simple retry mechanism in a deployment script using Python:

import time
import boto3
from botocore.exceptions import ClientError

def ensure_vanity_domain_certificate_exists():
    client = boto3.client('acm')
    retries = 5
    for attempt in range(retries):
        try:
            # Replace with your actual logic to ensure the certificate exists
            response = client.describe_certificate(CertificateArn='your-certificate-arn')
            print("Certificate exists:", response)
            break
        except ClientError as e:
            if e.response['Error']['Code'] == 'ThrottlingException':
                print(f"Rate limit exceeded, retrying in {2 ** attempt} seconds...")
                time.sleep(2 ** attempt)
            else:
                raise

ensure_vanity_domain_certificate_exists()

In this example, the script will retry the request up to 5 times, with an exponential backoff delay between attempts. Adjust the logic and parameters as needed for your specific deployment process.

By implementing these steps, you should be able to mitigate the "Rate Exceeded" error and successfully deploy your application using Vapor.

Please or to participate in this conversation.