Using the most recent version of LocalStack and the most recent version of the AWS CLI...

```
awslocal sqs create-queue --queue-name foo                                                                                                                                                                         
{                                                                                                                                                                                                                  
    "QueueUrl": "http://localhost:4566/000000000000/foo"
} 

awslocal sqs send-message --message-body hello --queue-url http://localhost/000000000000/foo                                                                                                                       
{                                                                                                                                                                                                                  
  "MD5OfMessageBody": "5d41402abc4b2a76b9719d911017c592", 
  "MessageId": "53be5840-770a-49e6-8e23-cfca3469c7ff" 
}
                                                                                                                                                                                                                                                                                                              
awslocal sqs receive-message --queue-url http://localhost/000000000000/foo
{
   "Messages": [                                                                                                                                                                                                  
        {                                                                                                                                                                                                          
            "MessageId": "53be5840-770a-49e6-8e23-cfca3469c7ff",                                                                                                                                                   
            "ReceiptHandle": "ZmE3NTAxZjItZTEzMS00ZDNjLWE0ODgtODUzNTU0ZjE4YzBjIGFybjphd3M6c3FzOnVzLWVhc3QtMTowMDAwMDAwMDAwMDA6Zm9vIDUzYmU1ODQwLTc3MGEtNDllNi04ZTIzLWNmY2EzNDY5YzdmZiAxNjk4OTUwNjM2LjQxODc3ODc=",   
            "MD5OfBody": "5d41402abc4b2a76b9719d911017c592",                                                                                                                                                       
            "Body": "hello"                                                                                                                                                                                        
        }                                                                                                                                                                                                          
    ]                                                                                                                                                                                                              
}                                                                                                                                                                                                                  

awslocal sqs change-message-visibility --visibility-timeout 10 --queue-url http://localhost:4566/000000000000/foo --receipt-handle ZmE3NTAxZjItZTEzMS00ZDNjLWE0ODgtODUzNTU0ZjE4YzBjIGFybjphd3M6c3FzOnVzLWVhc3QtMTo\wMDAwMDAwMDAwMDA6Zm9vIDUzYmU1ODQwLTc3MGEtNDllNi04ZTIzLWNmY2EzNDY5YzdmZiAxNjk4OTUwNjM2LjQxODc3ODc=                                                                                                                  
                                                                                                                                                                                                                   
An error occurred (AWS.SimpleQueueService.MessageNotInflight) when calling the ChangeMessageVisibility operation: Unknown 
```
assert failed["Code"] == "InvalidMessageContents"
        
        messages = []
        def collect_messages():
            response = aws_client.sqs.receive_message(
                Url=queue_url, MaxNumberOfMessages=10, WaitTimeSeconds=1
            )
            messages.extend(response.get("Messages", []))
            return len(messages)
        assert poll_condition(
            lambda: collect_messages() >= 9, timeout=10
        ), f"gave up waiting messages, got {len(messages)} from 9"
        bodies = {message["Body"] for message in messages}
        assert bodies == {"0", "1", "2", "3", "4", "5", "6", "7", "8"}
    @markers.aws.only_localstack
    def test_external_endpoint(self, monkeypatch, sqs_create_queue, aws_client):
        external_host = "external-host"
        external_port = 12345
        monkeypatch.setattr(config, "SQS_ENDPOINT_STRATEGY", "off")
        monkeypatch.setattr(
            config, "LOCALSTACK_HOST", config.HostAndPort(host=external_host, port=external_port)
        )
        queue_url = sqs_create_queue()
        assert f"{external_host}:{external_port}" in queue_url
        message_body = "external_host_test"
        aws_client.sqs.send_message(Url=queue_url, MessageBody=message_body)
        receive_result = aws_client.sqs.receive_message(Url=queue_url)
        assert receive_result["Messages"][0]["Body"] == message_body
    @markers.aws.only_localstack
    def test_external_hostname_via_host_header(self, monkeypatch, sqs_create_queue):