### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Currently it's looping this error

```
LocalStack version: 1.2.0
LocalStack build date: 2022-10-07
LocalStack build git hash: 9be2a7aa

Error starting infrastructure: Installation of kinesis-mock failed. Traceback (most recent call last):
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: MyHTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/etspaceman/kinesis-mock/releases/tags/0.2.5 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))
```

### Expected Behavior

every call to work properly

### How are you starting LocalStack?

With a `docker run` command

### Steps To Reproduce

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

Test Containers Go

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

DynamoDb Connection:

```
        	Error:      	Received unexpected error:
        	            	operation error DynamoDB: CreateTable, exceeded maximum number of attempts, 3, https response error StatusCode: 0, RequestID: , request send failed, Post "http://localhost:53740/": EOF

```

### Environment

```markdown
- OS: MacOS
- LocalStack: 1.2.0
```


### Anything else?

_No response_
import logging
import os
import threading
from abc import ABC
from functools import lru_cache
from typing import Callable, Dict, List
import requests
from localstack import config
from localstack.utils.platform import in_docker, is_debian, is_redhat
from localstack.utils.run import run
from ..utils.files import chmod_r, mkdir
from ..utils.http import download
from .api import InstallTarget, PackageException, PackageInstaller
LOG = logging.getLogger(__name__)
OS_PACKAGE_INSTALL_LOCK = threading.RLock()
_DEBIAN_CACHE_DIR = os.path.join(config.dirs.cache, "apt")
class SystemNotSupportedException(PackageException):
    """Exception indicating that the current system is not allowed."""
    pass
class OSPackageInstaller(PackageInstaller, ABC):
    """
    TODO make sure to log the output of all "run" commands (at least on trace level)
    Package installer abstraction for packages which are installed on operating system level, using the OS package
    manager.
    These packages are exceptional, since they cannot be installed to a specific target.
    If an OS level package is about to be installed to VAR_LIBS (i.e. it is installed at runtime and should persist
    across container-recreations), a warning will be logged and - depending on the OS - there might be some caching
    optimizations.
    """
    def __init__(self, name: str, version: str):