diff --git a/moto/sns/models.py b/moto/sns/models.py index cbff22029..9cae8b298 100644 --- a/moto/sns/models.py +++ b/moto/sns/models.py @@ -53,6 +53,8 @@ class Topic(CloudFormationModel): sns_backend.region_name, self.account_id, name ) self._tags = {} + self.fifo_topic = "false" + self.content_based_deduplication = "false" def publish(self, message, subject=None, message_attributes=None): message_id = str(uuid.uuid4()) diff --git a/moto/sns/responses.py b/moto/sns/responses.py index 7538c5fa7..2c088288c 100644 --- a/moto/sns/responses.py +++ b/moto/sns/responses.py @@ -170,6 +170,11 @@ class SNSResponse(BaseResponse): } if topic.kms_master_key_id: attributes["KmsMasterKeyId"] = topic.kms_master_key_id + if topic.fifo_topic == "true": + attributes["FifoTopic"] = topic.fifo_topic + attributes[ + "ContentBasedDeduplication" + ] = topic.content_based_deduplication response = { "GetTopicAttributesResponse": { "GetTopicAttributesResult": {"Attributes": attributes}, @@ -836,6 +841,16 @@ GET_TOPIC_ATTRIBUTES_TEMPLATE = """