Value of property Subscription must be a list of objects

Viewed 400

Using aws cloud formation designer to make a simple SNS topic with subscription and queue for SES. I connected the components but my stack fails to create the subscription.

Error: Value of property Subscription must be a list of objects

   "Resources": {
    "SNST3F2X9": {
        "Type": "AWS::SNS::Topic",
        "Properties": {
            "DisplayName": "EmailBounceTopic",
            "Subscription": [
                "EmailBounceSubscription"
            ],
            "TopicName": "EmailBounceTopic"
        },
        "Metadata": {
            "AWS::CloudFormation::Designer": {
                "id": "094fd7f3-2e35-4219-8f87-07ad335f85bb"
            }
        }
    },
    "SNST3FDSS": {
        "Type": "AWS::SNS::Subscription",
        "Properties": {
            "EndPoint": "BounceQueue",
            "Protocol": "SQS",
            "RawMessageDelivery": true,
            "TopicArn": {
                "Ref": "SNST3F2X9"
            }
        },
        "Metadata": {
            "AWS::CloudFormation::Designer": {
                "id": "b9524cd1-7d7a-46a6-9c34-33ceccccf3d4"
            }
        }
    },
    "SQSQ3OZGY": {
        "Type": "AWS::SQS::Queue",
        "Properties": {
            "QueueName": "BounceQueue"
        },
        "Metadata": {
            "AWS::CloudFormation::Designer": {
                "id": "d5a6cfd6-4b52-486a-97c1-4021528c32fc"
            }
        },
        "DependsOn": [
            "SNST3FDSS"
        ]
    }
}
1 Answers

Your current Subscription is:

            "Subscription": [
                "EmailBounceSubscription"
            ]

But Subscription should be a list of objects in the form of (example):

    "Subscription" : [{
      "Endpoint" : "EmailBounceSubscription",
      "Protocol" : "email"
    }
Related