title: Unable to validate the following destination configurations (S3 to SQS)
body: <p>I am trying to set up a workflow with serverless that creates a new S3 bucket, a new SQS queue and when an object is created in the S3 bucket, puts a messages on the queue and spins up a lambda once there are enough messages on the queue. I have the following in my resources block:</p>
  
  <pre><code>resources:
    Resources:
      AnalyticsQueue:
        Type: "AWS::SQS::Queue"
        Properties:
          QueueName: "my-queue"
      S3EventQueuePolicy:
        Type: AWS::SQS::QueuePolicy
        DependsOn: AnalyticsQueue
        Properties:
          PolicyDocument:
            Id: SQSPolicy
            Statement:
              - Effect: Allow
                Action: sqs:SendMessage:*
                Resource: !Ref AnalyticsQueue
          Queues:
            - !GetAtt AnalyticsQueue.Arn
      AnalyticsBucket:
        Type: AWS::S3::Bucket
        Properties:
          BucketName: "my-bucket"
          NotificationConfiguration:
            QueueConfigurations:
              - Event: s3:ObjectCreated:*
                Queue: !GetAtt AnalyticsQueue.Arn
  </code></pre>
  
  <p>When I try to deploy this I receive the following error:</p>
  
  <blockquote>
    <p>An error occurred: AnalyticsBucket - Unable to validate the following destination configurations (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: E2A1F8BD6BEE6EF4;).</p>
  </blockquote>
  
  <p>Some googling and I found that the issue is in the <code>NotificationConfiguration</code> block on the <code>AnalyticsBucket</code>. If I remove that whole sub-block, it deploys just fine but then obviously won't generate messages on the queue when objects get created.</p>
  
  <p>Looking for a way to resolve this.</p>