# AWS::SNS::TopicPolicy - Invalid template resource property 'Topics'

**URL:** <https://forum.serverless.com/t/aws-topicpolicy-invalid-template-resource-property-topics/2726>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [September 18, 2017, 5:27pm UTC](https://forum.serverless.com/t/aws-topicpolicy-invalid-template-resource-property-topics/2726 "2017-09-18T17:27:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dml](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/dml/32/1048_2.png) [@dml](https://forum.serverless.com/u/dml)\
**Post date:** [September 18, 2017, 5:27pm UTC](https://forum.serverless.com/t/aws-topicpolicy-invalid-template-resource-property-topics/2726/1 "2017-09-18T17:27:30Z")

</div>

Hi there!

i’m trying to create SNS topic and attach Policy to it. Here is a resource definition

```
resources:
  Resources:

    SnsFeedTopic:
      Type: AWS::SNS::Topic
      Properties:
        DisplayName: "Events Queue"
        TopicName: avro-feed

    SnsFeedTopicPolicy:
      Type: AWS::SNS::TopicPolicy
      Properties:
        PolicyDocument:
          Version: '2012-10-17'
          Statement:
            - Sid: SnsFeedTopicPolicy
              Effect: Allow
              Principal:
                Service: s3.amazonaws.com
              Action: sns:Publish
      Topics:
        - Ref: SnsFeedTopic

```

and here is an error

```
Error --------------------------------------------------

The CloudFormation template is invalid: Invalid template resource property 'Topics'

   For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Get Support --------------------------------------------
   Docs: docs.serverless.com
   Bugs: github.com/serverless/serverless/issues
   Forums: forum.serverless.com
   Chat: gitter.im/serverless/serverless

Your Environment Information -----------------------------
   OS: darwin
   Node Version: 8.4.0
   Serverless Version: 1.21.1

```

same to raw ARN definition

---

<div class="post-metadata">

**Author:** ![dml](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/dml/32/1048_2.png) [@dml](https://forum.serverless.com/u/dml)\
**Post date:** [September 18, 2017, 8:27pm UTC](https://forum.serverless.com/t/aws-topicpolicy-invalid-template-resource-property-topics/2726/2 "2017-09-18T20:27:02Z")

</div>

FIXED

really dump error, just used CloudFront designer to debug an error

Here are SNS resources with an attached policy

```
resources:
  Resources:
    SnsFirstTopic:
      Type: AWS::SNS::Topic
      Properties:
        DisplayName: First SNS Topic
        TopicName: first-avro-stream
    SnsSecondTopic:
      Type: AWS::SNS::Topic
      Properties:
        DisplayName: Second SNS Topic
        TopicName: second-avro-stream
    SnsTopicPolicy:
      Type: AWS::SNS::TopicPolicy
      Properties:
        PolicyDocument:
          Version: '2012-10-17'
          Statement:
          - Sid: SnsTopicPolicy
            Effect: Allow
            Principal:
              Service: s3.amazonaws.com
            Action: sns:Publish
            Resource: "*"
        Topics:
          - Ref: SnsFirstTopic
          - Ref: SnsSecondTopic

```

hint: take care about proper indentation for Topics

---

<div class="post-metadata">

**Author:** ![kiranch2004](https://avatars.discourse-cdn.com/v4/letter/k/c5a1d2/32.png) [@kiranch2004](https://forum.serverless.com/u/kiranch2004)\
**Post date:** [September 3, 2019, 2:04pm UTC](https://forum.serverless.com/t/aws-topicpolicy-invalid-template-resource-property-topics/2726/3 "2019-09-03T14:04:41Z")

</div>

Thank you. You saved me some time.
