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]`
try:
        return parse_arn(arn).get("service")
    except InvalidArnException:
        return None
def extract_resource_from_arn(arn: str) -> Optional[str]:
    try:
        return parse_arn(arn).get("resource")
    except InvalidArnException:
        return None
def role_arn(role_name, account_id=None, env=None):
    if not role_name:
        return role_name
    if role_name.startswith("arn:aws:iam::"):
        return role_name
    account_id = account_id or get_aws_account_id()
    return "arn:aws:iam::%s:role/%s" % (account_id, role_name)
def policy_arn(policy_name, account_id=None):
    if ":policy/" in policy_name:
        return policy_name
    account_id = account_id or get_aws_account_id()
    return "arn:aws:iam::{}:policy/{}".format(account_id, policy_name)
def iam_resource_arn(resource, role=None, env=None):
    env = get_environment(env)
    if not role:
        role = get_iam_role(resource, env=env)
    return role_arn(role_name=role, account_id=get_aws_account_id())
def get_iam_role(resource, env=None):
    env = get_environment(env)
    return "role-%s" % resource
def secretsmanager_secret_arn(secret_id, account_id=None, region_name=None, random_suffix=None):