### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Hi! 
I believe there is compatibility issue between localstack and Perl module wrapping S3 API [Net::Amazon::S3](https://metacpan.org/pod/Net::Amazon::S3). Uploading and downloading file works great, but listing bucket contents always gives empty list (i think also listing all buckets gives empty list but this is not an issue for me, since i'm always using one bucket). Listing files using AWS CLI, python's Boto3 or even old Perl alternative [Amazon::S3](https://metacpan.org/release/BIGFOOT/Amazon-S3-0.59/view/lib/Amazon/S3.pm) works OK for me.

### Expected Behavior

Both perl modules should be able to list bucket contents

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### Part of `docker-compose.yml`

```
  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
    image: localstack/localstack:latest
    ports:
      - "127.0.0.1:4566:4566"            # LocalStack Gateway
      - "127.0.0.1:4510-4559:4510-4559"  # external services port range
    environment:
      # LocalStack configuration: https://docs.localstack.cloud/references/configuration/
      - DEBUG=${DEBUG- }
    networks:
      - default


```
#### Perl code that prints nothing (i.e. can't see uploaded file)
```
#!/usr/bin/perl
use warnings;
use Net::Amazon::S3;

use Config::IniFiles;

my $bucket_name = "myname";
my $s3_endpoint = "localstack:4566";
my $homedir = "/usr/share/httpd";
my $aws_cfg = Config::IniFiles->new(-file => "$homedir/.aws/config");



my $s3 = Net::Amazon::S3->new(
    {
        aws_access_key_id => $aws_cfg->val('default', 'aws_access_key_id'),
        aws_secret_access_key => $aws_cfg->val('default', 'aws_secret_access_key'),
        retry => 1,
        host => $s3_endpoint,
        secure => 0,
        use_virtual_host => 0,
    }
);

$s3->add_bucket( { bucket => $bucket_name } )
    or die $s3->err . ": " . $s3->errstr;

my $bucket_obj = $s3->bucket($bucket_name);

my $bucket_contents = $bucket_obj->list
        or die $s3->err . ": " . $s3->errstr;

for my $key ( @{ $bucket_contents->{keys} } ) {
        print "$key->{key}\n";
}
```

#### Perl code that WORKS OK (i.e. prints out uploaded file "key")
```
#!/usr/bin/perl
use warnings;
use CGI::Carp;
use Amazon::S3;

use Config::IniFiles;

my $bucket_name = "/mybucket";
my $s3_endpoint = "localstack:4566";
my $homedir = "/usr/share/httpd";
my $aws_cfg = Config::IniFiles->new(-file => "$homedir/.aws/config");


my $s3 = Amazon::S3->new(
    {
        aws_access_key_id => $aws_cfg->val('default', 'aws_access_key_id'),
        aws_secret_access_key => $aws_cfg->val('default', 'aws_secret_access_key'),
        retry => 1,
        host => $s3_endpoint,
        secure => 0,
    }
);

$s3->add_bucket( { bucket => $bucket_name } )
    or die $s3->err . ": " . $s3->errstr;

my $bucket = $s3->bucket( $bucket_name );
my $keyname = 'testing.txt';
my $value   = 'T';
$bucket->add_key(
    $keyname, $value,
        {   content_type        => 'text/plain',
            'x-amz-meta-colour' => 'orange',
        }
   );

my $response = $bucket->list
     or die $s3->err . ": " . $s3->errstr;
print $response->{bucket}."\n";
for my $key (@{ $response->{keys} }) {
      print "\t".$key->{key}."\n";
}
```


### Environment

```markdown
- host OS: windows + WSL
- container OS (where perl is run): CentOS 7.9.2009
- LocalStack: 
localstack-main | LocalStack version: 3.0.3.dev
localstack-main | LocalStack build date: 2023-12-20
localstack-main | LocalStack build git hash: 5c3ef157
```


### Anything else?

Net::Amazon::S3 way works OK with real AWS S3 (eu-west-1)

g
    :return: wrapped function
    """
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except ResponseSerializerError:
            raise
        :
            raise UnknownSerializerError(
                "An unknown error occurred when trying to serialize the response."
            ) from e
    return wrapper
class ResponseSerializer(abc.ABC):
    """
    The response  is responsible for the serialization of a service implementation's result to an actual
    HTTP response (which will be sent to the calling client).
    It is the base class of all s and therefore contains the basic logic which is used among all of them.
    """
    DEFAULT_ENCODING = "utf-8"
    # The default timestamp format is ISO8601, but this can be overwritten by subclasses.
    TIMESTAMP_FORMAT = "iso8601"
    # Event streaming binary data type mapping for type "string"
    AWS_BINARY_DATA_TYPE_STRING = 7
    # Defines the supported mime types of the specific . Sorted by priority (preferred / default first).
    # Needs to be specified by subclasses.
    SUPPORTED_MIME_TYPES: List[str] = []
    @_handle_exceptions
    def serialize_to_response(
        self,
        response: dict,
        operation_model: OperationModel,
        headers: Optional[Dict | Headers],
        request_id: str,
    ) -> HttpResponse:
        """
        Takes a response dict and serializes it to an actual HttpResponse.
        :param response: to serialize
        :param operation_model: specification of the service & operation containing information about the shape of the
                                service's output / response
        zed for. This is necessary
                        esponse content type based on request headers).
        :param request_id: autogenerated AWS request ID identifying the original request
        :return: Htlling client
        :raises: ResponseSerializerError (either a ProtocolSerializerError or an Unknow