We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bug: sqs creation breaks with 0.14.1
### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Having the following cdk definition for a sqs queue
const queue = new sqs.Queue(scope, `foo-queue`, {
    fifo: true,
    visibilityTimeout: Duration.seconds(300),
    contentBasedDeduplication: true
})
deploy works normally with localstack 0.14.0 using https://github.com/localstack/aws-cdk-local
But after upgrading to 0.14.1 we see the following error
2022-03-17T11:34:23.851:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.<locals>._api_call of <botocore.client.SQS object at 0x7f11db7346d0>> with params: {'QueueName': 'FooStack-fooqueueB0475DE4-8bf04fb7', 'Attributes': {'ContentBasedDeduplication': 'True', 'FifoQueue': 'True', 'VisibilityTimeout': '300'}, 'tags': {}} for resource: {'Type': 'AWS::SQS::Queue', 'UpdateReplacePolicy': 'Delete', 'DeletionPolicy': 'Delete', 'Metadata': {'aws:cdk:path': 'FooStack/foo-queue/Resource'}, 'LogicalResourceId': 'fooqueueB0475DE4', 'Properties': {'ContentBasedDeduplication': True, 'FifoQueue': True, 'VisibilityTimeout': 300, 'QueueName': 'FooStack-fooqueueB0475DE4-8bf04fb7'}, '_state_': {}}
Only difference being the localstack upgrade, downgrading back to 0.14.0 fixes the problem.


### Expected Behavior

Sqs queue is created successfully like with 0.14.0

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

cdklocal deploy

### Environment

```markdown
- LocalStack: 0.14.1
```


### Anything else?

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `localstack/services/cloudformation/models/sqs.py`
Content:
```
1 import json
2 import logging
3 
4 from botocore.exceptions import ClientError
5 
6 from localstack.services.cloudformation.deployment_utils import (
7     PLACEHOLDER_RESOURCE_NAME,
8     generate_default_name,
9     params_list_to_dict,
10     params_select_attributes,
11 )
12 from localstack.services.cloudformation.service_models import (
13     DependencyNotYetSatisfied,
14     GenericBaseModel,
15 )
16 from localstack.utils.aws import aws_stack
17 from localstack.utils.common import short_uid
18 
19 LOG = logging.getLogger(__name__)
20 
21 
22 class QueuePolicy(GenericBaseModel):
23     @classmethod
24     def cloudformation_type(cls):
25         return "AWS::SQS::QueuePolicy"
26 
27     @classmethod
28     def get_deploy_templates(cls):
29         def _create(resource_id, resources, resource_type, func, stack_name):
30             sqs_client = aws_stack.connect_to_service("sqs")
31             resource = cls(resources[resource_id])
32             props = resource.props
33 
34             # TODO: generalize/support in get_physical_resource_id
35             resources[resource_id]["PhysicalResourceId"] = "%s-%s-%s" % (
36                 stack_name,
37                 resource_id,
38                 short_uid(),
39             )
40 
41             policy = json.dumps(props["PolicyDocument"])
42             for queue in props["Queues"]:
43                 sqs_client.set_queue_attributes(QueueUrl=queue, Attributes={"Policy": policy})
44 
45         def _delete(resource_id, resources, *args, **kwargs):
46             sqs_client = aws_stack.connect_to_service("sqs")
47             resource = cls(resources[resource_id])
48             props = resource.props
49 
50             for queue in props["Queues"]:
51                 try:
52                     sqs_client.set_queue_attributes(QueueUrl=queue, Attributes={"Policy": ""})
53                 except ClientError as err:
54                     if "AWS.SimpleQueueService.NonExistentQueue" != err.response["Error"]["Code"]:
55                         raise
56 
57         return {
58             "create": {"function": _create},
59             "delete": {
60                 "function": _delete,
61             },
62         }
63 
64 
65 class SQSQueue(GenericBaseModel):
66     @classmethod
67     def cloudformation_type(cls):
68         return "AWS::SQS::Queue"
69 
70     def get_resource_name(self):
71         return self.props.get("QueueName")
72 
73     def get_physical_resource_id(self, attribute=None, **kwargs):
74         queue_url = None
75         props = self.props
76         try:
77             queue_url = aws_stack.get_sqs_queue_url(props.get("QueueName"))
78         except Exception as e:
79             if "NonExistentQueue" in str(e):
80                 raise DependencyNotYetSatisfied(
81                     resource_ids=self.resource_id, message="Unable to get queue: %s" % e
82                 )
83         if attribute == "Arn":
84             return aws_stack.sqs_queue_arn(props.get("QueueName"))
85         return queue_url
86 
87     def fetch_state(self, stack_name, resources):
88         queue_name = self.resolve_refs_recursively(stack_name, self.props["QueueName"], resources)
89         sqs_client = aws_stack.connect_to_service("sqs")
90         queues = sqs_client.list_queues()
91         result = list(
92             filter(
93                 lambda item:
94                 # TODO possibly find a better way to compare resource_id with queue URLs
95                 item.endswith("/%s" % queue_name),
96                 queues.get("QueueUrls", []),
97             )
98         )
99         if not result:
100             return None
101         result = sqs_client.get_queue_attributes(QueueUrl=result[0], AttributeNames=["All"])[
102             "Attributes"
103         ]
104         result["Arn"] = result["QueueArn"]
105         return result
106 
107     @staticmethod
108     def add_defaults(resource, stack_name: str):
109         role_name = resource.get("Properties", {}).get("QueueName")
110         if not role_name:
111             resource["Properties"]["QueueName"] = generate_default_name(
112                 stack_name, resource["LogicalResourceId"]
113             )
114 
115     @classmethod
116     def get_deploy_templates(cls):
117         def _queue_url(params, resources, resource_id, **kwargs):
118             resource = cls(resources[resource_id])
119             props = resource.props
120             queue_url = resource.physical_resource_id or props.get("QueueUrl")
121             if queue_url:
122                 return queue_url
123             return aws_stack.sqs_queue_url_for_arn(props["QueueArn"])
124 
125         return {
126             "create": {
127                 "function": "create_queue",
128                 "parameters": {
129                     "QueueName": ["QueueName", PLACEHOLDER_RESOURCE_NAME],
130                     "Attributes": params_select_attributes(
131                         "ContentBasedDeduplication",
132                         "DelaySeconds",
133                         "FifoQueue",
134                         "MaximumMessageSize",
135                         "MessageRetentionPeriod",
136                         "VisibilityTimeout",
137                         "RedrivePolicy",
138                         "ReceiveMessageWaitTimeSeconds",
139                     ),
140                     "tags": params_list_to_dict("Tags"),
141                 },
142             },
143             "delete": {
144                 "function": "delete_queue",
145                 "parameters": {"QueueUrl": _queue_url},
146             },
147         }
148
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/localstack/services/cloudformation/models/sqs.py b/localstack/services/cloudformation/models/sqs.py
--- a/localstack/services/cloudformation/models/sqs.py
+++ b/localstack/services/cloudformation/models/sqs.py
@@ -107,10 +107,13 @@
     @staticmethod
     def add_defaults(resource, stack_name: str):
         role_name = resource.get("Properties", {}).get("QueueName")
+
         if not role_name:
             resource["Properties"]["QueueName"] = generate_default_name(
                 stack_name, resource["LogicalResourceId"]
             )
+            if resource["Properties"].get("FifoQueue"):
+                resource["Properties"]["QueueName"] += ".fifo"
 
     @classmethod
     def get_deploy_templates(cls):

{"golden_diff": "diff --git a/localstack/services/cloudformation/models/sqs.py b/localstack/services/cloudformation/models/sqs.py\n--- a/localstack/services/cloudformation/models/sqs.py\n+++ b/localstack/services/cloudformation/models/sqs.py\n@@ -107,10 +107,13 @@\n     @staticmethod\n     def add_defaults(resource, stack_name: str):\n         role_name = resource.get(\"Properties\", {}).get(\"QueueName\")\n+\n         if not role_name:\n             resource[\"Properties\"][\"QueueName\"] = generate_default_name(\n                 stack_name, resource[\"LogicalResourceId\"]\n             )\n+            if resource[\"Properties\"].get(\"FifoQueue\"):\n+                resource[\"Properties\"][\"QueueName\"] += \".fifo\"\n \n     @classmethod\n     def get_deploy_templates(cls):\n", "issue": "bug: sqs creation breaks with 0.14.1\n### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Current Behavior\n\nHaving the following cdk definition for a sqs queue\r\nconst queue = new sqs.Queue(scope, `foo-queue`, {\r\n    fifo: true,\r\n    visibilityTimeout: Duration.seconds(300),\r\n    contentBasedDeduplication: true\r\n})\r\ndeploy works normally with localstack 0.14.0 using https://github.com/localstack/aws-cdk-local\r\nBut after upgrading to 0.14.1 we see the following error\r\n2022-03-17T11:34:23.851:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.<locals>._api_call of <botocore.client.SQS object at 0x7f11db7346d0>> with params: {'QueueName': 'FooStack-fooqueueB0475DE4-8bf04fb7', 'Attributes': {'ContentBasedDeduplication': 'True', 'FifoQueue': 'True', 'VisibilityTimeout': '300'}, 'tags': {}} for resource: {'Type': 'AWS::SQS::Queue', 'UpdateReplacePolicy': 'Delete', 'DeletionPolicy': 'Delete', 'Metadata': {'aws:cdk:path': 'FooStack/foo-queue/Resource'}, 'LogicalResourceId': 'fooqueueB0475DE4', 'Properties': {'ContentBasedDeduplication': True, 'FifoQueue': True, 'VisibilityTimeout': 300, 'QueueName': 'FooStack-fooqueueB0475DE4-8bf04fb7'}, '_state_': {}}\r\nOnly difference being the localstack upgrade, downgrading back to 0.14.0 fixes the problem.\r\n\n\n### Expected Behavior\n\nSqs queue is created successfully like with 0.14.0\n\n### How are you starting LocalStack?\n\nWith a docker-compose file\n\n### Steps To Reproduce\n\ncdklocal deploy\n\n### Environment\n\n```markdown\n- LocalStack: 0.14.1\n```\n\n\n### Anything else?\n\n_No response_\n", "before_files": [{"content": "import json\nimport logging\n\nfrom botocore.exceptions import ClientError\n\nfrom localstack.services.cloudformation.deployment_utils import (\n    PLACEHOLDER_RESOURCE_NAME,\n    generate_default_name,\n    params_list_to_dict,\n    params_select_attributes,\n)\nfrom localstack.services.cloudformation.service_models import (\n    DependencyNotYetSatisfied,\n    GenericBaseModel,\n)\nfrom localstack.utils.aws import aws_stack\nfrom localstack.utils.common import short_uid\n\nLOG = logging.getLogger(__name__)\n\n\nclass QueuePolicy(GenericBaseModel):\n    @classmethod\n    def cloudformation_type(cls):\n        return \"AWS::SQS::QueuePolicy\"\n\n    @classmethod\n    def get_deploy_templates(cls):\n        def _create(resource_id, resources, resource_type, func, stack_name):\n            sqs_client = aws_stack.connect_to_service(\"sqs\")\n            resource = cls(resources[resource_id])\n            props = resource.props\n\n            # TODO: generalize/support in get_physical_resource_id\n            resources[resource_id][\"PhysicalResourceId\"] = \"%s-%s-%s\" % (\n                stack_name,\n                resource_id,\n                short_uid(),\n            )\n\n            policy = json.dumps(props[\"PolicyDocument\"])\n            for queue in props[\"Queues\"]:\n                sqs_client.set_queue_attributes(QueueUrl=queue, Attributes={\"Policy\": policy})\n\n        def _delete(resource_id, resources, *args, **kwargs):\n            sqs_client = aws_stack.connect_to_service(\"sqs\")\n            resource = cls(resources[resource_id])\n            props = resource.props\n\n            for queue in props[\"Queues\"]:\n                try:\n                    sqs_client.set_queue_attributes(QueueUrl=queue, Attributes={\"Policy\": \"\"})\n                except ClientError as err:\n                    if \"AWS.SimpleQueueService.NonExistentQueue\" != err.response[\"Error\"][\"Code\"]:\n                        raise\n\n        return {\n            \"create\": {\"function\": _create},\n            \"delete\": {\n                \"function\": _delete,\n            },\n        }\n\n\nclass SQSQueue(GenericBaseModel):\n    @classmethod\n    def cloudformation_type(cls):\n        return \"AWS::SQS::Queue\"\n\n    def get_resource_name(self):\n        return self.props.get(\"QueueName\")\n\n    def get_physical_resource_id(self, attribute=None, **kwargs):\n        queue_url = None\n        props = self.props\n        try:\n            queue_url = aws_stack.get_sqs_queue_url(props.get(\"QueueName\"))\n        except Exception as e:\n            if \"NonExistentQueue\" in str(e):\n                raise DependencyNotYetSatisfied(\n                    resource_ids=self.resource_id, message=\"Unable to get queue: %s\" % e\n                )\n        if attribute == \"Arn\":\n            return aws_stack.sqs_queue_arn(props.get(\"QueueName\"))\n        return queue_url\n\n    def fetch_state(self, stack_name, resources):\n        queue_name = self.resolve_refs_recursively(stack_name, self.props[\"QueueName\"], resources)\n        sqs_client = aws_stack.connect_to_service(\"sqs\")\n        queues = sqs_client.list_queues()\n        result = list(\n            filter(\n                lambda item:\n                # TODO possibly find a better way to compare resource_id with queue URLs\n                item.endswith(\"/%s\" % queue_name),\n                queues.get(\"QueueUrls\", []),\n            )\n        )\n        if not result:\n            return None\n        result = sqs_client.get_queue_attributes(QueueUrl=result[0], AttributeNames=[\"All\"])[\n            \"Attributes\"\n        ]\n        result[\"Arn\"] = result[\"QueueArn\"]\n        return result\n\n    @staticmethod\n    def add_defaults(resource, stack_name: str):\n        role_name = resource.get(\"Properties\", {}).get(\"QueueName\")\n        if not role_name:\n            resource[\"Properties\"][\"QueueName\"] = generate_default_name(\n                stack_name, resource[\"LogicalResourceId\"]\n            )\n\n    @classmethod\n    def get_deploy_templates(cls):\n        def _queue_url(params, resources, resource_id, **kwargs):\n            resource = cls(resources[resource_id])\n            props = resource.props\n            queue_url = resource.physical_resource_id or props.get(\"QueueUrl\")\n            if queue_url:\n                return queue_url\n            return aws_stack.sqs_queue_url_for_arn(props[\"QueueArn\"])\n\n        return {\n            \"create\": {\n                \"function\": \"create_queue\",\n                \"parameters\": {\n                    \"QueueName\": [\"QueueName\", PLACEHOLDER_RESOURCE_NAME],\n                    \"Attributes\": params_select_attributes(\n                        \"ContentBasedDeduplication\",\n                        \"DelaySeconds\",\n                        \"FifoQueue\",\n                        \"MaximumMessageSize\",\n                        \"MessageRetentionPeriod\",\n                        \"VisibilityTimeout\",\n                        \"RedrivePolicy\",\n                        \"ReceiveMessageWaitTimeSeconds\",\n                    ),\n                    \"tags\": params_list_to_dict(\"Tags\"),\n                },\n            },\n            \"delete\": {\n                \"function\": \"delete_queue\",\n                \"parameters\": {\"QueueUrl\": _queue_url},\n            },\n        }\n", "path": "localstack/services/cloudformation/models/sqs.py"}], "after_files": [{"content": "import json\nimport logging\n\nfrom botocore.exceptions import ClientError\n\nfrom localstack.services.cloudformation.deployment_utils import (\n    PLACEHOLDER_RESOURCE_NAME,\n    generate_default_name,\n    params_list_to_dict,\n    params_select_attributes,\n)\nfrom localstack.services.cloudformation.service_models import (\n    DependencyNotYetSatisfied,\n    GenericBaseModel,\n)\nfrom localstack.utils.aws import aws_stack\nfrom localstack.utils.common import short_uid\n\nLOG = logging.getLogger(__name__)\n\n\nclass QueuePolicy(GenericBaseModel):\n    @classmethod\n    def cloudformation_type(cls):\n        return \"AWS::SQS::QueuePolicy\"\n\n    @classmethod\n    def get_deploy_templates(cls):\n        def _create(resource_id, resources, resource_type, func, stack_name):\n            sqs_client = aws_stack.connect_to_service(\"sqs\")\n            resource = cls(resources[resource_id])\n            props = resource.props\n\n            # TODO: generalize/support in get_physical_resource_id\n            resources[resource_id][\"PhysicalResourceId\"] = \"%s-%s-%s\" % (\n                stack_name,\n                resource_id,\n                short_uid(),\n            )\n\n            policy = json.dumps(props[\"PolicyDocument\"])\n            for queue in props[\"Queues\"]:\n                sqs_client.set_queue_attributes(QueueUrl=queue, Attributes={\"Policy\": policy})\n\n        def _delete(resource_id, resources, *args, **kwargs):\n            sqs_client = aws_stack.connect_to_service(\"sqs\")\n            resource = cls(resources[resource_id])\n            props = resource.props\n\n            for queue in props[\"Queues\"]:\n                try:\n                    sqs_client.set_queue_attributes(QueueUrl=queue, Attributes={\"Policy\": \"\"})\n                except ClientError as err:\n                    if \"AWS.SimpleQueueService.NonExistentQueue\" != err.response[\"Error\"][\"Code\"]:\n                        raise\n\n        return {\n            \"create\": {\"function\": _create},\n            \"delete\": {\n                \"function\": _delete,\n            },\n        }\n\n\nclass SQSQueue(GenericBaseModel):\n    @classmethod\n    def cloudformation_type(cls):\n        return \"AWS::SQS::Queue\"\n\n    def get_resource_name(self):\n        return self.props.get(\"QueueName\")\n\n    def get_physical_resource_id(self, attribute=None, **kwargs):\n        queue_url = None\n        props = self.props\n        try:\n            queue_url = aws_stack.get_sqs_queue_url(props.get(\"QueueName\"))\n        except Exception as e:\n            if \"NonExistentQueue\" in str(e):\n                raise DependencyNotYetSatisfied(\n                    resource_ids=self.resource_id, message=\"Unable to get queue: %s\" % e\n                )\n        if attribute == \"Arn\":\n            return aws_stack.sqs_queue_arn(props.get(\"QueueName\"))\n        return queue_url\n\n    def fetch_state(self, stack_name, resources):\n        queue_name = self.resolve_refs_recursively(stack_name, self.props[\"QueueName\"], resources)\n        sqs_client = aws_stack.connect_to_service(\"sqs\")\n        queues = sqs_client.list_queues()\n        result = list(\n            filter(\n                lambda item:\n                # TODO possibly find a better way to compare resource_id with queue URLs\n                item.endswith(\"/%s\" % queue_name),\n                queues.get(\"QueueUrls\", []),\n            )\n        )\n        if not result:\n            return None\n        result = sqs_client.get_queue_attributes(QueueUrl=result[0], AttributeNames=[\"All\"])[\n            \"Attributes\"\n        ]\n        result[\"Arn\"] = result[\"QueueArn\"]\n        return result\n\n    @staticmethod\n    def add_defaults(resource, stack_name: str):\n        role_name = resource.get(\"Properties\", {}).get(\"QueueName\")\n\n        if not role_name:\n            resource[\"Properties\"][\"QueueName\"] = generate_default_name(\n                stack_name, resource[\"LogicalResourceId\"]\n            )\n            if resource[\"Properties\"].get(\"FifoQueue\"):\n                resource[\"Properties\"][\"QueueName\"] += \".fifo\"\n\n    @classmethod\n    def get_deploy_templates(cls):\n        def _queue_url(params, resources, resource_id, **kwargs):\n            resource = cls(resources[resource_id])\n            props = resource.props\n            queue_url = resource.physical_resource_id or props.get(\"QueueUrl\")\n            if queue_url:\n                return queue_url\n            return aws_stack.sqs_queue_url_for_arn(props[\"QueueArn\"])\n\n        return {\n            \"create\": {\n                \"function\": \"create_queue\",\n                \"parameters\": {\n                    \"QueueName\": [\"QueueName\", PLACEHOLDER_RESOURCE_NAME],\n                    \"Attributes\": params_select_attributes(\n                        \"ContentBasedDeduplication\",\n                        \"DelaySeconds\",\n                        \"FifoQueue\",\n                        \"MaximumMessageSize\",\n                        \"MessageRetentionPeriod\",\n                        \"VisibilityTimeout\",\n                        \"RedrivePolicy\",\n                        \"ReceiveMessageWaitTimeSeconds\",\n                    ),\n                    \"tags\": params_list_to_dict(\"Tags\"),\n                },\n            },\n            \"delete\": {\n                \"function\": \"delete_queue\",\n                \"parameters\": {\"QueueUrl\": _queue_url},\n            },\n        }\n", "path": "localstack/services/cloudformation/models/sqs.py"}]}