According to the [AWS CFN docs for SQS](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-properties-sqs-queues-return-values-ref), the physical resource ID should be its queue URL.

>Ref
>
>When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the queue URL. For example:
>
>{ "Ref": "https://sqs.us-east-2.amazonaws.com/123456789012/aa4-MyQueue-Z5NOSZO2PZE9" }

However, SQS queues created in Localstack via CloudFormation have physical resource IDs that are equal to the queue name:

```
$ aws cloudformation list-stack-resources --stack-name my-stack --endpoint http://localhost:4581 | grep -A3 -B3 Queue
        {
            "LogicalResourceId": "EventQueue",
            "PhysicalResourceId": "my-stack-events",
            "ResourceType": "AWS::SQS::Queue",
            "LastUpdatedTimestamp": "2011-06-21T20:15:58Z",
            "ResourceStatus": "CREATE_COMPLETE"
        },
```

I believe that this [was fixed at one point](https://github.com/localstack/localstack/pull/577) in Localstack, but seems to have since been reverted. I've [submitted an upstream issue](https://github.com/spulec/moto/issues/2407) to Moto as well.
import os
import re
import sys
import json
import time
import signal
import traceback
import logging
import boto3
import subprocess
from requests.models import Response
from localstack import constants, config
from localstack.config import USE_SSL, DEFAULT_REGION
from localstack.constants import (
    ENV_DEV, LOCALSTACK_VENV_FOLDER, ENV_INTERNAL_TEST_RUN,
    DEFAULT_PORT_APIGATEWAY_BACKEND, DEFAULT_PORT_SNS_BACKEND,
    DEFAULT_PORT_IAM_BACKEND, DEFAULT_PORT_EC2_BACKEND, DEFAULT_SERVICE_PORTS)
from localstack.utils import common, persistence
from localstack.utils.common import (TMP_THREADS, run, get_free_tcp_port,
    FuncThread, ShellCommandThread, get_service_protocol, in_docker, is_port_open)
from localstack.utils.server import multiserver
from localstack.utils.bootstrap import setup_logging, is_debug, canonicalize_api_names, load_plugins
from localstack.utils.analytics import event_publisher
from localstack.services import generic_proxy, install
from localstack.services.es import es_api
from localstack.services.firehose import firehose_api
from localstack.services.awslambda import lambda_api
from localstack.services.generic_proxy import GenericProxy, GenericProxyHandler, ProxyListener
from localstack.services.dynamodbstreams import dynamodbstreams_api