### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I am trying to publish a message using SNS, when I set the String Value for any particular data type (String, Number...) as the documentation explains the publish fails with the following error:

```java
PublishRequest publishRequest = new PublishRequest();
		publishRequest.setTopicArn(topicArn);
		publishRequest.setMessage(message);
		publishRequest.setMessageAttributes(Map.of("country",  new MessageAttributeValue().withDataType("String").withStringValue("country1")));
```

```
localstack_1        | 2022-09-20T16:04:40.049 ERROR --- [ Thread-3574] asyncio                    : Task exception was never retrieved

localstack_1        | future: <Task finished name='Task-27660' coro=<message_to_subscriber() done, defined at /opt/code/localstack/localstack/services/sns/provider.py:904> exception=KeyError('BinaryValue')>

localstack_1        | Traceback (most recent call last):

localstack_1        |   File "/opt/code/localstack/localstack/services/sns/provider.py", line 957, in message_to_subscriber

localstack_1        |     message_body = create_sns_message_body(subscriber, req_data, message_id, message_attributes)

localstack_1        |   File "/opt/code/localstack/localstack/services/sns/provider.py", line 1271, in create_sns_message_body

localstack_1        |     data["MessageAttributes"] = prepare_message_attributes(message_attributes)

localstack_1        |   File "/opt/code/localstack/localstack/services/sns/provider.py", line 1327, in prepare_message_attributes

localstack_1        |     val = base64.b64encode(attr["BinaryValue"]).decode()

localstack_1        | KeyError: 'BinaryValue'
```

**When I skip setting the dataType and use the withStringValue directly it works:**

```java
inal PublishRequest publishRequest = new PublishRequest();
		publishRequest.setTopicArn(topicArn);
		publishRequest.setMessage(message);
		publishRequest.setMessageAttributes(Map.of("country",  new MessageAttributeValue().withStringValue("country1")));
```

```
localstack_1        | 2022-09-21T15:31:15.544  INFO --- [   asgi_gw_1] localstack.request.aws     : AWS sns.Publish => 200
```

### Expected Behavior

- The call to publish with dataType set explicitly should be successful

### 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 -d localstack

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

    aws --endpoint-url http://localhost:4566 sqs create-queue --queue-name "$QUEUE_NAME" --output text

    aws --endpoint-url http://localhost:4566 sns create-topic --name "$TOPIC_NAME" --output text
  
   aws --endpoint-url http://localhost:4566 sns subscribe --topic-arn "$TOPIC_ARN" --protocol sqs --notification-endpoint "$QUEUE_URL" --output text


### Environment

```markdown
- OS:MAC OS BIG SUR
- LocalStack: 1.1.0
```


### Anything else?

_No response_
subscriber: dict, success: bool, message: str, message_id: str, delivery: dict = None
):
    log_group_name = subscriber.get("TopicArn", "").replace("arn:aws:", "").replace(":", "/")
    log_stream_name = long_uid()
    invocation_time = int(time.time() * 1000)
    delivery = not_none_or(delivery, {})
    delivery["deliveryId"] = (long_uid(),)
    delivery["destination"] = (subscriber.get("Endpoint", ""),)
    delivery["dwellTimeMs"] = 200
    if not success:
        delivery["attemps"] = 1
    delivery_log = {
        "notification": {
            "messageMD5Sum": md5(message),
            "messageId": message_id,
            "topicArn": subscriber.get("TopicArn"),
            "timestamp": datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f%z"),
        },
        "delivery": delivery,
        "status": "SUCCESS" if success else "FAILURE",
    }
    log_output = json.dumps(json_safe(delivery_log))
    return store_cloudwatch_logs(log_group_name, log_stream_name, log_output, invocation_time)
def extract_tags(topic_arn, tags, is_create_topic_request, sns_backend):