### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When attempting to sign some document using Localstack KMS inside a lambda container (also running on localstack), the localstack KMS listener returns some unknown error.

The KMS key and lambda containers have been created from the same CDK app deploy, and I can see all the resources in the localstack web console.

The test application I'm using to prove this behaviour is available here:
https://github.com/LukaHedt/localstack_kms_test

Instructions to run are in the main Readme, and the `/localstack/Readme.md` file.

`aws-sdk` returns an unknown error, and the localstack docker logs that I receive are available here:
https://pastebin.com/58Z3fXi3

Have done an amount of testing and can confidently claim the following:
- Have tested on multiple machines with the same outcome
- Doesn’t make a difference if I specify an ARN or a KeyID in the signing request
- Downgrading localstack versions either didn’t make a difference, or I couldn’t actually deploy a localstack container with version 0.12.20 or lower.

### Expected Behavior

KMS Sign should return a signature for the given payload.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

Test application demonstrating the current behaviour is available here:

https://github.com/LukaHedt/localstack_kms_test

Full instructions to run are in the `/localstack/Readme.md` file.


### Environment

```markdown
- OS: MacOS Monteray 12.3
- LocalStack: 0.14.0
```


### Anything else?

_No response_
region_details = KMSBackend.get()
    kms = aws_stack.connect_to_service("kms")
    key_id = data.get("KeyId")
    key_spec = data.get("KeyPairSpec") or data.get("KeySpec") or data.get("CustomerMasterKeySpec")
    key = None
    public_format = None
    if key_spec.startswith("RSA"):
        rsa_key_sizes = {
            "RSA_2048": 2048,
            "RSA_3072": 3072,
            "RSA_4096": 4096,
        }
        key_size = rsa_key_sizes.get(key_spec)
        key = rsa.generate_private_key(public_exponent=65537, key_size=key_size)
        public_format = crypto_serialization.PublicFormat.PKCS1
    if key_spec.startswith("ECC"):
        curve = None
        if key_spec == "ECC_NIST_P256":
            curve = ec.BrainpoolP256R1()
        elif key_spec == "ECC_NIST_P384":
            curve = ec.BrainpoolP384R1()
        elif key_spec == "ECC_NIST_P521":
            curve = ec.BrainpoolP512R1()
        elif key_spec == "ECC_SECG_P256K1":
            curve = ec.SECP256K1()
        key = ec.generate_private_key(curve)
        public_format = crypto_serialization.PublicFormat.SubjectPublicKeyInfo