Examples of using Amazon S3 Select on an object
Important
Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more
You can use S3 Select to select content from one object by using the Amazon S3 console, the REST API, and the Amazon SDKs.
For more information about supported SQL functions for S3 Select, see SQL functions.
To select content from an object in the Amazon S3 console
-
Sign in to the Amazon Web Services Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/
. -
In the left navigation pane, choose Buckets.
-
Choose the bucket that contains the object that you want to select content from, and then choose the name of the object.
-
Choose Object actions, and choose Query with S3 Select.
-
Configure Input settings, based on the format of your input data.
-
Configure Output settings, based on the format of the output that you want to receive.
-
To extract records from the chosen object, under SQL query, enter the SELECT SQL commands. For more information on how to write SQL commands, see SQL reference for Amazon S3 Select.
-
After you enter SQL queries, choose Run SQL query. Then, under Query results, you can see the results of your SQL queries.
You can use the Amazon SDKs to select content from an object. However, if your application requires it, you can send REST requests directly. For more information about the request and response format, see SelectObjectContent.
You can use Amazon S3 Select to select some of the content of an object by using the
selectObjectContent
method. If this method is successful, it
returns the results of the SQL expression.