### Is there an existing issue for this?

- [X] I have searched the existing issues and read the documentation

### Question

### Issue
I deployed jar as lambda function in localstack triggered by SNS Event. I published a compressed payload to SNS topic which triggered my lambda function. During runtime, SNS Event to my lambda handler comes with message attribute by name Format Type. While extracting SNSEvent.MessageAttribute, the object is coming as LinkedHashMap and am getting an exception

### Exception Message
 Exception in thread "main" java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class com.amazonaws.services.lambda.runtime.events.SNSEvent$MessageAttribute (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; com.amazonaws.services.lambda.runtime.events.SNSEvent$MessageAttribute is in unnamed module of loader 'app')

### IDE screenshot
<img width="1104" alt="Screen Shot 2022-06-09 at 10 11 17 PM" src="https://user-images.githubusercontent.com/11893250/172999694-24a1f879-3a4f-45d4-8a94-98c325d61334.png">



### Anything else?

_No response_
sns_backend = SNSBackend.get()
        def should_be_kept(current_subscription, target_subscription_arn):
            if current_subscription["SubscriptionArn"] != target_subscription_arn:
                return True
            if current_subscription["Protocol"] in ["http", "https"]:
                external_url = external_service_url("sns")
                subscription_token = short_uid()
                message_id = long_uid()
                subscription_url = create_subscribe_url(
                    external_url, current_subscription["TopicArn"], subscription_token
                )
                message = {
                    "Type": ["UnsubscribeConfirmation"],
                    "MessageId": [message_id],
                    "Token": [subscription_token],
                    "TopicArn": [current_subscription["TopicArn"]],
                    "Message": [
                        "You have chosen to deactivate subscription %s.\nTo cancel this operation and restore the subscription, visit the SubscribeURL included in this message."
                        % target_subscription_arn
                    ],
                    "SubscribeURL": [subscription_url],
                    "Timestamp": [datetime.datetime.utcnow().timestamp()],
                }
                headers = {
                    "x-amz-sns-message-type": "UnsubscribeConfirmation",
                    "x-amz-sns-message-id": message_id,
                    "x-amz-sns-topic-arn": current_subscription["TopicArn"],
                    "x-amz-sns-subscription-arn": target_subscription_arn,
                }