### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

```
An error occurred (500) when calling the CreateGrant operation (reached max retries: 4): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
```

### Expected Behavior

_No response_

### How are you starting LocalStack?

Custom (please describe below)

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

    helm install localstack/localstack

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

    aws kms create-grant --key-id=738f46cb-444b-4fc5-9c6f-8c1165279dbb --grantee-principal=arn:aws:iam::000000000000:role/test --operations=Encrypt


### Environment

```markdown
- OS: 
- LocalStack: 0.12.17
```


### Anything else?

_No response_
queue_urls = list()
    def factory(**kwargs):
        if "QueueName" not in kwargs:
            kwargs["QueueName"] = "test-queue-%s" % short_uid()
        response = sqs_client.create_queue(QueueName=kwargs["QueueName"])
        url = response["QueueUrl"]
        queue_urls.append(url)
        return sqs_client.get_queue_attributes(QueueUrl=url, AttributeNames=["All"])
    yield factory
    
    for queue_url in queue_urls:
        try:
            sqs_client.delete_queue(QueueUrl=queue_url)
        except Exception as e:
            LOG.debug("error cleaning up queue %s: %s", queue_url, e)
@pytest.fixture
def sqs_queue(sqs_create_queue):
    return sqs_create_queue()
@pytest.fixture
def sns_topic(sns_client):
    
    topic_name = "test-topic-%s" % short_uid()
    response = sns_client.create_topic(Name=topic_name)
    topic_arn = response["TopicArn"]
    yield sns_client.get_topic_attributes(TopicArn=topic_arn)
    sns_client.delete_topic(TopicArn=topic_arn)
@pytest.fixture
def cleanup_stacks(cfn_client):