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 sys
import logging
import traceback
import six
from moto.s3 import models as s3_models
from moto.iam import models as iam_models
from moto.sqs import models as sqs_models
from moto.core import BaseModel
from moto.server import main as moto_main
from moto.dynamodb import models as dynamodb_models
from moto.dynamodb2 import models as dynamodb2_models
from moto.awslambda import models as lambda_models
from moto.apigateway import models as apigw_models
from moto.cloudformation import parsing, responses
from boto.cloudformation.stack import Output
from moto.cloudformation.exceptions import ValidationError, UnformattedGetAttTemplateException
from localstack import config
from localstack.constants import DEFAULT_PORT_CLOUDFORMATION_BACKEND, TEST_AWS_ACCOUNT_ID, MOTO_ACCOUNT_ID
from localstack.utils.aws import aws_stack
from localstack.utils.common import FuncThread, short_uid, recurse_object, clone, json_safe
from localstack.stepfunctions import models as sfn_models
from localstack.services.infra import (
    get_service_protocol, start_proxy_for_service, do_run, canonicalize_api_names)
from localstack.utils.bootstrap import setup_logging
from localstack.utils.cloudformation import template_deployer
from localstack.services.cloudformation import service_models