### 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_
_requests.put(request)
            return Response(status=429)
        number_of_endpoints = 4
        servers = []
        for _ in range(number_of_endpoints):
            server = HTTPServer()
            server.start()
            servers.append(server)
            server.expect_request("/").respond_with_handler(handler)
            http_endpoint = server.url_for("/")
            wait_for_port_open(http_endpoint)
            sns_subscription(TopicArn=topic_arn, Protocol="http", Endpoint=http_endpoint)
        # f
        subscription_list = sns_client.list_subscriptions_by_topic(TopicArn=topic_arn)
        assert subscription_list["ResponseMetadata"]["HTTPStatusCode"] == 200
        assert (
            len(subscription_list["Subscriptions"]) == number_of_endpoints
        ), f"unexpected number of subscriptions {subscription_list}"
        for _ in range(number_of_endpoints):
            request = _requests.get(timeout=2)
            assert request.get_json(True)["TopicArn"] == topic_arn
        with pytest.raises(queue.Empty):
            # m
            _requests.get(timeout=1)
        for server in servers:
            server.stop()
    @pytest.mark.only_localstack
    def test_publish_sms_endpoint(self, sns_client, sns_create_topic, sns_subscription):