Download a pdf from external link to amazon s3 account

I have a pdf link that got from an api call.That link has an expiry date.So I want to download this pdf into my amazon s3 account.How can i do this in yii2

Download the PDF (can use cURL for that) and then submit to S3 - which I recommend using an extension.

We’ve forked and are maintain a extension for this job bp-sys/yii2-aws-s3, which is a fork from the great extension by frostealth (frostealth/yii2-aws-s3).

The difference is that we are adding Traits to easy your job uploading files and attaching to a model.