UiPath – How to Copy Files to AWS S3

This tutorial will walk you through how to copy files from the local drive to an AWS S3 bucket during a UiPath RPA process. One use case is creating a feed where data is scraped from a website, the data is stored in a .csv file during the process and then the .csv file is copied to an S3 bucket for use by another system.

Pre-requisites:

  1. Create an S3 user for the process in AWS IAM see this article
  2. Download the public and secret access keys for the user for use in the AWS CLI tool
  3. Download, install and configure the AWS CLI tool, see this article
    • This needs to be done in all environments where the process will be used – e.g. development, production etc.
  4. Write the process to extract the data and create the .csv file in UIPath Studio

Method:

  1. Use the Invoke Power Shell activity
    • UIPath.Core.Activities.InvokePowerShell<System.String>
  2. In the Properties panel, add the CLI CommandText to copy the file from its current location to the S3 bucket
    • "aws s3 cp YOURFILEPATH s3://YOURBUCKETNAME/YOURFILENAME"
  3. Check the IsScript checkbox
  4. Change the TypeArgument to String
UiPath AWS S3 Power Shell Activity
UiPath AWS S3 Power Shell Activity
UiPath AWS S3 Power Shell Activity Properties Panel
UiPath AWS S3 Power Shell Activity Properties Panel