Welcome to the Alteryx Knowledge Base

Amazon S3 Download – Use Wildcards to Select a Single or Multiple Objects
user

Created/Edited - 7/24/2026 by Dan Chapman | Alteryx

Prerequisites
  1. An Amazon S3 account – Don’t have one? Createone
  2. Download the Amazon Web Services (AWS) Command Line Interface (CLI)
  3. Configure the CLI with your credentials
    1. Navigatingto theC:\Program Files\Amazon\AWSCLI folder and type in the configure command
      aws configure
    2. Follow the prompts and enter the information requested. Choose text for output format:
      AWS Access Key ID [None]: accesskey AWS Secret Access Key [None]: secretkey Default region name [None]: us-west-2 Default output format [None]: text
Procedure

As currently designed, the Amazon S3 Download tool only allows one file, or object, to be read in at a time. This article explains how to create a workflow and batch macro that will read in the list of objects in a bucket and allow you to filter for the file(s) you want using wildcards; similar to how you can use them with the regular Input tool. Workflow attached.

Create the Workflow and Macro

Now we are ready to create the workflow and macro:

  1. Using a Text Input tool, enter the lines below. The last line can be any directory of your choosing
    cd\ cd programs files\amazon\awscli aws s3 ls s3://alteryxtest > c:\users\\awslist.txt
  2. Next, use the Run Command tool to create the .bat file, run the .bat file and read in the list of objects returned by the .bat file:
    1. Output the text from the above Input Tool to a .bat file in the Write Source section as a .csv file. Remember to change the delimiter to none (\0) and uncheck the box that says "First Row Contains Field Names" so commas and headers arenot written out to the .bat file
    2. In the 'Run External Programs' section under 'Command', choose the .bat file that gets created in the previous step. PleaseNote:This file will not exist yet, so you must run the workflow once to get it created
    3. Check the 'Run Minimized' and 'Run Silent' boxes
    4. In the 'Read Results' sections at the bottom, choose the file that was created from the .bat file. Again, run the workflow once after the .bat file is run in order for there to be a file to choose.Be sure to uncheck the 'First Row Contains Field Names' box
  3. Use the Text to Columns tool to parse the list that is returned into usablefiles names
  4. Use a Filter tool to filter the files desired
  5. Create and insert a batch macro to pull each file filtered
    1. Use a Control Parameter tool to update the Object Name of a properly configured Amazon S3 Download tool
    2. Add a macro output
    3. Save the macro and insert into the original workflow
  6. Add a browse after the inserted macro to list the data

 

This workflow can easily be enhanced using the Interface tools to allow the user to select the bucket to be searched, as well as give the user options on what files to filter for.

Please feel free to leave any questions in the Comment Section. Thank you for reading!

Was this article helpful?