Amazon S3 query tutorial | Retool Docs (2024)

Learn how to interact with S3 data.

You can connect to Amazon S3 or S3-compatible services by creating a resource in Retool. Once complete, you can write app or workflow queries to interact with S3 bucket data.

You select the action type for S3 queries that determines what action the query performs, such as listing all files or uploading data.

List all files in a bucket

Select List all files in a bucket to retrieve a list of all files. This contains information about each file, such as the file key.

You can use Prefix to filter results so only file keys that start with the same string are returned. In general, use prefixes to filter directory structure, such as images/. You can enter values directly into this field or reference component values like {{ textInput.value }}.

Read a file from S3

Select Read a file from S3 to retrieve the contents of a specified file. You set the value of S3 file key to the corresponding key of the file to retrieve. The content of the file is base64-encoded.

For example, you can configure a Listbox component to use data from a query that lists all images in S3. The selected file is retrieved from S3 using {{ listbox1.value }} as the S3 file key, then displayed using the Image component.

Download a file from S3

Select Download a file from S3 to retrieve a specified file from the S3 bucket. This action is similar to Read a file from S3 but the file is downloaded by the browser instead of being made available by the query.

Generate a signed URL

Select Generate a signed URL to retrieve a direct link to the file. You specify the operation name that the URL supports, such as GET or PUT, along with any operation options to include.

For example, you can select a file from a list and generate a signed URL for it that expires in 60 seconds. Set the Operation name to Get object and Operation options to the following:

{
Key: {{ listBox1.value }},
Expires: 60
}

The signed URL can be used by anyone to download the file, but is no longer valid after 60 seconds.

Upload data

Select Upload data to upload data to the S3 bucket. You configure the following settings when writing an upload query:

Action typeDescription
S3 Content-TypeThe MIME type for the uploaded file. You can select a MIME type for common file types, such as CSV and JSON, or specify a custom value.
Upload file nameThe file name for the uploaded data.
Upload dataThe base64-encoded data to upload.

The File Button, File Dropzone, and File Input components for web apps return base64-encoded values and MIME types for selected files.

The Image Input component for Retool Mobile apps returns blob values and MIME types for selected files. Use utils.getDataByObjectURL in a JavaScript query first to convert blobs into base64-encoded values.

return utils.getDataByObjectURL(imageInput1.value[0]);

Copy a file to a new location

Select Copy a file to a new location to copy a file and save it to another location. You provide the key of the file to copy as Copy source, and the key of the file to create as Destination file key.

Delete a file from S3

Select Delete a file from S3 to delete the specified file from the S3 bucket. To prevent accidental deletion, you can enable Show a confirmation modal before running in the Advanced tab of the query. You can also reference the current file key the query would delete in the Confirmation message:

{{ deleteData.fileKey }} will be permanently deleted. Are you sure?

Select Get tags on a file from S3 to get all tags for the specified file. Tags are returned as key-value pairs. Select Delete tags on a file from S3 to remove all tags from the specified file.

Select Update tags on a file from S3 to update the specified tags or add new ones. Set Tag Set with key-value pairs for the required tags.

Amazon S3 query tutorial | Retool Docs (2024)
Top Articles
Dividend vs Share Buyback/Repurchase
How to make a breach of contract claim | Harper James Solicitors
The Atlanta Constitution from Atlanta, Georgia
Midflorida Overnight Payoff Address
South Park Season 26 Kisscartoon
Rabbits Foot Osrs
Z-Track Injection | Definition and Patient Education
Deshret's Spirit
Pollen Count Los Altos
South Bend Tribune Online
Slmd Skincare Appointment
Guardians Of The Galaxy Vol 3 Full Movie 123Movies
123Moviescloud
Nonuclub
Diablo 3 Metascore
Mary Kay Lipstick Conversion Chart PDF Form - FormsPal
Chastity Brainwash
Adam4Adam Discount Codes
How to Create Your Very Own Crossword Puzzle
Pickswise Review 2024: Is Pickswise a Trusted Tipster?
Self-Service ATMs: Accessibility, Limits, & Features
Sef2 Lewis Structure
‘The Boogeyman’ Review: A Minor But Effectively Nerve-Jangling Stephen King Adaptation
R. Kelly Net Worth 2024: The King Of R&B's Rise And Fall
Pirates Of The Caribbean 1 123Movies
Jeff Nippard Push Pull Program Pdf
Disputes over ESPN, Disney and DirecTV go to the heart of TV's existential problems
BJ 이름 찾는다 꼭 도와줘라 | 짤방 | 일베저장소
Apparent assassination attempt | Suspect never had Trump in sight, did not get off shot: Officials
Local Collector Buying Old Motorcycles Z1 KZ900 KZ 900 KZ1000 Kawasaki - wanted - by dealer - sale - craigslist
Afni Collections
Free T33N Leaks
Usa Massage Reviews
R/Mp5
Otis Inmate Locator
Grove City Craigslist Pets
Star News Mugshots
Haunted Mansion Showtimes Near Cinemark Tinseltown Usa And Imax
Pch Sunken Treasures
Helloid Worthington Login
Blue Beetle Movie Tickets and Showtimes Near Me | Regal
Domina Scarlett Ct
Bella Thorne Bikini Uncensored
Publictributes
Doordash Promo Code Generator
Top 40 Minecraft mods to enhance your gaming experience
60 Days From May 31
Unit 11 Homework 3 Area Of Composite Figures
Server Jobs Near
Meee Ruh
Ihop Deliver
Provincial Freeman (Toronto and Chatham, ON: Mary Ann Shadd Cary (October 9, 1823 – June 5, 1893)), November 3, 1855, p. 1
Latest Posts
Article information

Author: Errol Quitzon

Last Updated:

Views: 6533

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Errol Quitzon

Birthday: 1993-04-02

Address: 70604 Haley Lane, Port Weldonside, TN 99233-0942

Phone: +9665282866296

Job: Product Retail Agent

Hobby: Computer programming, Horseback riding, Hooping, Dance, Ice skating, Backpacking, Rafting

Introduction: My name is Errol Quitzon, I am a fair, cute, fancy, clean, attractive, sparkling, kind person who loves writing and wants to share my knowledge and understanding with you.