### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Lambda refs get lost

### Expected Behavior

Lambda refs work in state machines

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

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

    docker run localstack/localstack

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

    awslocal s3 mb s3://mybucket


### Environment

```markdown
- OS: 
- LocalStack:
```


### Anything else?

This is based on a conversation I had with @dominikschubert 
import re
import unittest
from localstack.utils.cloudformation import template_deployer, template_preparer
class CloudFormationTest(unittest.TestCase):
    def test_resolve_references(self):
        ref = {
            "Fn::Join": [
                "",
                [
                    "arn:",
                    {"Ref": "AWS::Partition"},
                    ":apigateway:",
                    {"Ref": "AWS::Region"},
                    ":lambda:path/2015-03-31/functions/",
                    "test:lambda:arn",
                    "/invocations",
                ],
            ]
        }
        stack_name = "test"
        resources = {}
        result = template_deployer.resolve_refs_recursively(stack_name, ref, resources)
        pattern = (
            r"arn:aws:apigateway:.*:lambda:path/2015-03-31/functions/test:lambda:arn/invocations"
        )
        self.assertTrue(re.match(pattern, result))
    def test_is_local_service_url(self):