Upload a File to Amazon S3 Bucket¶
- Configure CORS on your Amazon S3 Bucket
- Upload or Download a File to an Amazon S3 Bucket from the Explore UI
- Upload or Download a File to an Amazon S3 Bucket using the Analyze or Notebooks UI
Configure CORS on your Amazon S3 Bucket¶
You must configure Cross-Origin Resource Sharing (CORS) on the Amazon S3 bucket to which you want to upload the file.
New users can configure CORS on their Default Location (default storage Amazon S3 bucket) available under Storage Settings on the Control Panel page.
Perform these steps to configure CORS on an Amazon S3 bucket:
- Login to Amazon S3.
- Navigate to the Amazon S3 bucket on which you want to configure CORS.
- Go to Permissions and click Add CORS Configuration.
- Repeat steps 2-3 to configure CORS on any other Amazon S3 buckets to which you want to upload files.
Here is a sample CORS configuration.
<?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>https://api.qubole.com</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>
The syntax above uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.
Upload or Download a File to an Amazon S3 Bucket from the Explore UI¶
You must have the object Storage resource permission for the role assigned to you for uploading and downloading data. For more information, see Resources, Actions, and What they Mean.
To upload a file into an Amazon S3 bucket from the Explore UI:
Navigate to the Explore page. Click My Amazon S3 from the drop-down list.
Select the default location (default storage Amazon S3 bucket) from the drop-down list.
Ensure CORS has been configured on this bucket.
- Click the file upload icon . The file upload dialog is displayed.
The maximum file size limit for uploads is 4GB.
- Browse to the location of the file and select it. Click Submit.
A success message is displayed if the upload is successful. An error message is displayed if the upload is unsuccessful. Go to the corresponding Amazon S3 bucket and confirm that the uploaded file is listed in the bucket.
To download a file from an Amazon S3 bucket:
- Navigate to the Explore page. Select the file that you want to download.
- Click the file download icon .
Upload or Download a File to an Amazon S3 Bucket using the Analyze or Notebooks UI¶
This section describes uploading and downloading a file to or from an Amazon S3 location through the Analyze UI.
Uploading and Downloading a File to or from a Cloud Location describes uploading and downloading a file to or from an Amazon S3 location through the Notebooks UI.