1
votes

I am trying to create an SQS queue and its associated access policy using cloudformation. Tried a few iterations but it keeps giving me this error:

Value of property Queues must be of type List of String

Below is my template. Can anyone help me point the issue in this:

    SQSQueue:
        Type: "AWS::SQS::Queue"
        Properties:
            DelaySeconds: "0"
            MaximumMessageSize: "262144"
            MessageRetentionPeriod: "10800"
            ReceiveMessageWaitTimeSeconds: "0"
            VisibilityTimeout: "30"
            QueueName: "ScanQueueItems"

    DocSQSSNSPolicy:
        Type: AWS::SQS::QueuePolicy
        Properties:
            PolicyDocument:
                Id: MessageToSQSPolicy
                Statement:
                    Effect: Allow
                    Principal: "*"
                    Action:
                        - SQS:SendMessage
                    Resource: !GetAtt SQSQueue.Arn  
            Queues: !Ref SQSQueue
1

1 Answers

1
votes

Queues should be List of String. This means that instead of:

Queues: !Ref SQSQueue

you should have:

Queues: 
    - !Ref SQSQueue

or shorter:

Queues: [!Ref SQSQueue]