user8545255
user8545255

Reputation: 839

unzip and copy file from web to s3 bucket

I am trying to copy the file directly from web to s3 bucket.

https://www.ncua.gov/analysis/credit-union-corporate-call-report-data/quarterly-data

I want to unzip and copy 2019 march data from the above link to s3 bucket.

Upvotes: 1

Views: 479

Answers (1)

Pacifist
Pacifist

Reputation: 3203

You can simply write a shell script which will do something like this :

curl -O https://www.ncua.gov/files/publications/analysis/call-report-data-2019-03.zip

or

wget https://www.ncua.gov/files/publications/analysis/call-report-data-2019-03.zip

This will download the zip file onto your terminal. Then unzip it using below command :

unzip call-report-data-2019-03.zip

And then use below command to send it to S3:

aws s3 cp call-report-data-2019-03 s3://<bucket-name> --recursive

Let me know if anything else is required.

Upvotes: 1

Related Questions