How to grab a single file from S3 bucket for use in a flow

Hey there Decisions, 


I'm currently using an AWS S3 bucket to store files.

I'd like to know if there's a way that I can pull one file from S3, run it through a flow, and then move the file into an archive folder within my S3 Bucket.


Any help or suggestions would be great, thank you.

Comments

  • Hey there, thanks for using the Decisions Community Forum!


    This is definitely possible.

    You can use a series of steps: List Objects > Rule Collection Filter (Filtering by size and 'Key') > Get File Contents > Map in the output of the previous step into your process

    1. List Objects

    2. Rule Collection Filter

    3. Get File Contents

    4. You can then map the outputs from 'Get File Contents' into your flow, keeping in mind you may have to build data on the inputs to your flow due to the formatting of the Get File Contents output.

    Once you've completed this you can also work in logic to move the file in S3 to another bucket/folder.

    You can do this by using the Put File in S3 step, and once that's done use Delete File From S3, since the Put File step will create a copy of the file to wherever you specified.


    We have documentation on all the S3 steps here: https://documentation.decisions.com/docs/aws-s3-step-glossary

    Regards,

    Levi | Decisions Support

Sign In or Register to comment.