All docs This doc
Skip to end of metadata
Go to start of metadata

The select operation returns a set of attributes for items that match the select expression. The select operation is similar to the standard SQL SELECT statement and is case-sensitive. For further information on how to construct select expressions, see Using Select to Create Amazon SimpleDB Queries.

Amazon SimpleDB keeps multiple copies of each domain. When data is written or updated, all copies of the data are updated. However, it takes time for the update to propagate to all storage locations. The data will eventually be consistent, but an immediate read might not show the change.


  • consistentRead: Optional - When it is set to true, ensures that the most recent data is returned. For more information, see Consistency.
  • nextToken: Optional - String that tells Amazon SimpleDB where to start the next list of item names.
  • selectExpression: Required - The expression used to query the domain.
  • The total size of the response cannot exceed 1 MB. Amazon SimpleDB automatically adjusts the number of items returned per page to enforce this limit. For example, even if you ask to retrieve 2500 items with each individual item being 10 KB in size, the system returns 100 items and an appropriate next token so you can get the next page of results.
  • Operations that run longer than 5 seconds return a time-out error response or a partial or empty result set. Partial and empty result sets contain a nextToken value, which allows you to continue the operation from where it left off.
  • Responses larger than one megabyte return a partial result set.
  • The application should not excessively retry queries that return QueryTimeout errors. If too many QueryTimeout errors are received, reduce the complexity of the query expression.
  • Note that Amazon SimpleDB does not guarantee how attributes are ordered in the returned response.
  • For information about limits that affect select, see Limits.


Sample request

Following is a sample REST/XML request that can be handled by the select operation.

Sample Request for select
	<selectExpression>select * from table</selectExpression>
Related Amazon SimpleDB documentation

Sample configuration

Following is a sample proxy service that illustrates how to connect to Amazon SimpleDB with the init operation and use the select operation. The sample request for this proxy can be found in select sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns=""
      <inSequence onError="faultHandlerSeq">	  
		  <property name="apiUrl" expression="//apiUrl/text()"/>
		  <property name="accessKeyId" expression="//accessKeyId/text()"/>
		  <property name="secretAccessKey" expression="//secretAccessKey/text()"/>
		  <property name="action" expression="//action/text()"/>
		  <property name="version" expression="//version/text()"/>
		  <property name="signatureVersion" expression="//signatureVersion/text()"/>
		  <property name="signatureMethod" expression="//signatureMethod/text()"/>
          <property name="selectExpression" expression="//selectExpression/text()"/>
          <property name="nextToken" expression="//nextToken/text()"/>
          <property name="consistentRead" expression="//consistentRead/text()"/>		 
         <makefault version="soap11">
            <code expression="get-property('ERROR_CODE')"/>
            <reason expression="get-property('ERROR_MESSAGE')"/>
            <detail expression="get-property('ERROR_DETAIL')"/>
  • No labels