When PUTting an S3 object to Localstack with attached Metadata, if a key contains an underscore it is replaced with a dash.

However, when the same request is performed against the real S3, the key is not modified.

Example Input:
key_with_underscores => test

Localstack Result:
key-with-underscores => test

S3 Result:
key_with_underscores => test

Localstack Version: 0.10.5

Tested using AWS v2 S3 client
""" Removes <?xml ... ?> from a response content """
    response._content = re.sub(r'^<\?[^\?]+\?>', '', response._content)
def get_lifecycle(bucket_name):
    bucket_name = normalize_bucket_name(bucket_name)
    lifecycle = BUCKET_LIFECYCLE.get(bucket_name)
    status_code = 200
    if not lifecycle:
        
        lifecycle = {
            'Error': {
                'Code': 'NoSuchLifecycleConfiguration',
                'Message': 'The lifecycle configuration does not exist'
            }
        }
        status_code = 404
    body = xmltodict.unparse(lifecycle)
    return requests_response(body, status_code=status_code)
def get_replication(bucket_name):