title: Best way to make Amazon AWS DynamoDB queries using Swift?
body: <p>I have recently implemented the AWS SDK for my iOS app, which I am developing in Swift. I have connected to my DB instance and am able to get a query response, however, I am struggling to convert this into usable data. I'm relatively new to Swift, AWS and programming in general so maybe missing something obvious!</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>    let atVal = AWSDynamoDBAttributeValue()
      atVal.S = "123456abc"
      let condition = AWSDynamoDBCondition()
      condition.comparisonOperator = AWSDynamoDBComparisonOperator.EQ
      condition.attributeValueList = [atVal]
  
      let myDic: [String: AWSDynamoDBCondition] = ["userid": condition]
      let query = AWSDynamoDBQueryInput()
      query.indexName = "userid-index"
      query.tableName = "users"
      query.keyConditions = myDic
      query.limit = 1
  
  
      dynamoDB.query(query).continueWithBlock {
          (task: BFTask!) -&gt; AnyObject! in
          let results = task.result as AWSDynamoDBQueryOutput
  
          let myResults = results.items
          println("object: \(myResults.description)")
  
          return nil
      }
  </code></pre>
  
  <p>And the console output for this is:</p>
  
  <p>object: [{
      area = " {\n    S = \"West Hampstead\";\n}";
      name = " {\n    S = \"Olly Mayes\";\n}";
      userid = " {\n    S = \"123456abc\";\n}";
  }]</p>
  
  <p>There doesn't seem to be much precedence for using AWS and Swift, understandably, so any help would be much appreciated! </p>