Repository: getmoto/moto

Issue:
'attributes' is empty for SNS subscriptions
When SNS `subscribe` function is call, a SNS `subscription` is created but some informations are missing.

With a real `subscription` creation, the field `attributes` of every subscription look something like this :
```
{
  'Owner': '123456789012', 
  'RawMessageDelivery': 'false', 
  'TopicArn': 'arn:aws:sns:eu-central-1:123456789012:topic_xxxx', 
  'Endpoint': 'https://test.com', 
  'EffectiveDeliveryPolicy': '{"healthyRetryPolicy":{"minDelayTarget":20,"maxDelayTarget":20,"numRetries":3,"numMaxDelayRetries":0,"numNoDelayRetries":0,"numMinDelayRetries":0,"backoffFunction":"linear"},"sicklyRetryPolicy":null,"throttlePolicy":null,"guaranteed":false}', 
  'Protocol': 'https', 
  'PendingConfirmation': 'false', 
  'ConfirmationWasAuthenticated': 'false', 
  'SubscriptionArn': 'arn:aws:sns:eu-central-1:123456789012:topic_xxxx:11111111-2222-3333-4444-5555555555'
}
```

With mocked subscription, this field `subscription` is totally empty. 
In my case, I need at least to have the `PendingConfirmation` (I discovered I can directly check the subscription's arn instead of checking this but whatever), `TopicArn` and `Endpoint` fields to be present in the `attributes` dict.

I'm going to make a PR for having the :  'PendingConfirmation', 'Endpoint', 'TopicArn', 'Protocol and 'SubscriptionArn' in the `attributes` dict. They can be retrieve and set easily so it's at least a good start.


Discussion:

Resolving patch:
diff --git a/moto/sns/models.py b/moto/sns/models.py
--- a/moto/sns/models.py
+++ b/moto/sns/models.py
@@ -432,11 +432,18 @@ def subscribe(self, topic_arn, endpoint, protocol):
         subscription = Subscription(topic, endpoint, protocol)
         attributes = {
             "PendingConfirmation": "false",
+            "ConfirmationWasAuthenticated": "true",
             "Endpoint": endpoint,
             "TopicArn": topic_arn,
             "Protocol": protocol,
             "SubscriptionArn": subscription.arn,
+            "Owner": DEFAULT_ACCOUNT_ID,
+            "RawMessageDelivery": "false",
         }
+
+        if protocol in ["http", "https"]:
+            attributes["EffectiveDeliveryPolicy"] = topic.effective_delivery_policy
+
         subscription.attributes = attributes
         self.subscriptions[subscription.arn] = subscription
         return subscription
@@ -696,18 +703,18 @@ def untag_resource(self, resource_arn, tag_keys):
 
 
 DEFAULT_EFFECTIVE_DELIVERY_POLICY = {
-    "http": {
-        "disableSubscriptionOverrides": False,
-        "defaultHealthyRetryPolicy": {
-            "numNoDelayRetries": 0,
-            "numMinDelayRetries": 0,
-            "minDelayTarget": 20,
-            "maxDelayTarget": 20,
-            "numMaxDelayRetries": 0,
-            "numRetries": 3,
-            "backoffFunction": "linear",
-        },
-    }
+    "defaultHealthyRetryPolicy": {
+        "numNoDelayRetries": 0,
+        "numMinDelayRetries": 0,
+        "minDelayTarget": 20,
+        "maxDelayTarget": 20,
+        "numMaxDelayRetries": 0,
+        "numRetries": 3,
+        "backoffFunction": "linear",
+    },
+    "sicklyRetryPolicy": None,
+    "throttlePolicy": None,
+    "guaranteed": False,
 }
 
 


Test patch:
diff --git a/tests/test_sns/test_subscriptions_boto3.py b/tests/test_sns/test_subscriptions_boto3.py
--- a/tests/test_sns/test_subscriptions_boto3.py
+++ b/tests/test_sns/test_subscriptions_boto3.py
@@ -8,7 +8,11 @@
 from nose.tools import assert_raises
 
 from moto import mock_sns
-from moto.sns.models import DEFAULT_PAGE_SIZE
+from moto.sns.models import (
+    DEFAULT_PAGE_SIZE,
+    DEFAULT_EFFECTIVE_DELIVERY_POLICY,
+    DEFAULT_ACCOUNT_ID,
+)
 
 
 @mock_sns
@@ -195,21 +199,23 @@ def test_subscribe_attributes():
 
     resp = client.subscribe(TopicArn=arn, Protocol="http", Endpoint="http://test.com")
 
-    attributes = client.get_subscription_attributes(
+    response = client.get_subscription_attributes(
         SubscriptionArn=resp["SubscriptionArn"]
     )
 
-    attributes.should.contain("Attributes")
-    attributes["Attributes"].should.contain("PendingConfirmation")
-    attributes["Attributes"]["PendingConfirmation"].should.equal("false")
-    attributes["Attributes"].should.contain("Endpoint")
-    attributes["Attributes"]["Endpoint"].should.equal("http://test.com")
-    attributes["Attributes"].should.contain("TopicArn")
-    attributes["Attributes"]["TopicArn"].should.equal(arn)
-    attributes["Attributes"].should.contain("Protocol")
-    attributes["Attributes"]["Protocol"].should.equal("http")
-    attributes["Attributes"].should.contain("SubscriptionArn")
-    attributes["Attributes"]["SubscriptionArn"].should.equal(resp["SubscriptionArn"])
+    response.should.contain("Attributes")
+    attributes = response["Attributes"]
+    attributes["PendingConfirmation"].should.equal("false")
+    attributes["ConfirmationWasAuthenticated"].should.equal("true")
+    attributes["Endpoint"].should.equal("http://test.com")
+    attributes["TopicArn"].should.equal(arn)
+    attributes["Protocol"].should.equal("http")
+    attributes["SubscriptionArn"].should.equal(resp["SubscriptionArn"])
+    attributes["Owner"].should.equal(str(DEFAULT_ACCOUNT_ID))
+    attributes["RawMessageDelivery"].should.equal("false")
+    json.loads(attributes["EffectiveDeliveryPolicy"]).should.equal(
+        DEFAULT_EFFECTIVE_DELIVERY_POLICY
+    )
 
 
 @mock_sns