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]`
partition: str
    service: str
    region: str
    account: str
    resource: str
def parse_arn(arn: str) -> ArnData:
    """
    Uses a botocore ArnParser to parse an arn.
    :param arn: the arn string to parse
    :returns: a dictionary containing the ARN components
    :raises InvalidArnException: if the arn is invalid
    """
    return _arn_parser.parse_arn(arn)
def extract_region_from_arn(arn: str) -> Optional[str]:
    try:
        return parse_arn(arn).get("region")
    except InvalidArnException:
        return None
def extract_service_from_arn(arn: str) -> Optional[str]: