https://github.com/localstack/localstack/blob/e7efc768a20e75feafe3702a5a6e477a233feff2/localstack/utils/aws/aws_stack.py#L904

```
File "/usr/local/lib/python3.8/site-packages/localstack/services/generic_proxy.py", line 50, in <module>
from localstack.utils.aws import aws_stack
File "/usr/local/lib/python3.8/site-packages/localstack/utils/aws/aws_stack.py", line 904, in <module>
) -> dict[str, str]:
TypeError: 'type' object is not subscriptable
```

Please fix to `Dict[str, str]`
"""Return the local service URL for the given service name or port."""
    if isinstance(service_name_or_port, int):
        return f"{config.get_protocol()}://{LOCALHOST}:{service_name_or_port}"
    service_name = service_name_or_port
    if service_name == "s3api":
        service_name = "s3"
    elif service_name == "runtime.sagemaker":
        service_name = "sagemaker-runtime"
    return config.service_url(service_name)
def connect_to_resource(
    service_name, env=None, region_name=None, endpoint_url=None, *args, **kwargs
):
    """
    Generic method to obtain an AWS service resource using boto3, based on environment, region, or custom endpoint_url.
    """
    return connect_to_service(
        service_name,
        client=False,
        env=env,
        region_name=region_name,
        endpoint_url=endpoint_url,
        *args,
        **kwargs,
    )
def connect_to_resource_external(