Downloading a CSV from an S3 bucket Command

Hi there guys,

Hoping someone could lend a hand.

The bot has access to an AWS S3 bucket, what i need to do is download the .CSV (the name of it can differ), ideally I would download locally and then Read the data , then upload to another folder in the bucket.

I have tried the following Command in an invoke powershell activity:

"aws s3 mv s3://XXXX/Stg/In/ --include ‘*.csv’ "+strReportPath

^ where report path is where I’d like to move the file.

This doesn’t seem to work, all I have been able to successfully do is list the files in the folder with:

“aws s3 ls s3://XXXXX/Stg/In/” - but i cannot seem to only list the .csv file.

Any thoughts/help with commands would be greatly appreciated!!

Hi @Kyleb91 Are you using the AWS activities? Did you try this?

1 Like

Thanks a lot @carmen . I have explored these and they are great but can’t seem to access the buckets I need to. More internal I feel.

But with the use of commands I can list the files, but Ideally I want to just download the .CSV and then upload elsewhere so I am having difficulty formulating these commands…

I am guessing that you probably have the rights to read the files but not to move … have you tried copy instead moving it? like this for example:

aws s3 cp s3://XXXX/Stg/In/*.csv copy.csv