### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I am running an SNS topic that publishes to a lambda function. The localstack code reads a type byte object from the lambda function invocation payload [here](https://github.com/localstack/localstack/blob/master/localstack/services/sns/publisher.py#L187) and then tries to dump the result into json [here](https://github.com/localstack/localstack/blob/master/localstack/services/sns/publisher.py#L863) which results in the following error:
```
sns_pub_0] l.services.sns.publisher   : Unable to run Lambda function on SNS message: Object of type bytes is not JSON serializable
```

### Expected Behavior

The payload bytes should be converted to a string before being dumped to json. The error should not be thrown.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

docker-compose up
(Using the standard docker-compose.yaml)

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

```
awslocal sns publish --message file://sns/message.json --topic-arn arn:aws:sns:us-east-1:000000000000:<topic_name>
```

### Environment

```markdown
- OS: macOS Ventura 13.2.1
- LocalStack: latest
```


### Anything else?

_No response_
"""
    Validate the message attribute name with the specification of AWS.
    The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore(_), hyphen(-), and period (.). The name must not start or end with a period, and it should not have successive periods.
    :param name: message attribute name
    :raises InvalidParameterValueException: if the name does not conform to the spec
    """
    if not sns_constants.MSG_ATTR_NAME_REGEX.match(name):
        
        if name[0] == ".":
            raise InvalidParameterValueException(
                "Invalid message attribute name starting with character '.' was found."
            )
        elif name[-1] == ".":
            raise InvalidParameterValueException(
                "Invalid message attribute name ending with character '.' was found."
            )
        for idx, char in enumerate(name):
            if char not in sns_constants.VALID_MSG_ATTR_NAME_CHARS:
                
                hex_char = "#x" + hex(ord(char)).upper()[2:]
                raise InvalidParameterValueException(
                    f"Invalid non-alphanumeric character '{hex_char}' was found in the message attribute name. Can only include alphanumeric characters, hyphens, underscores, or dots."
                )
            
            if char == "." and name[idx - 1] == ".":
                raise InvalidParameterValueException(
                    "Message attribute name can not have successive '.' character."
                )
def extract_tags(topic_arn, tags, is_create_topic_request, store):