Upload file to s3 directly from url

Is it Possible to upload a file to s3 directly from url.I have an api call that returns a url for a pdf.And that url has expiry date.So I want to save this file into s3.How can it possible in yii2?

Just google “yii2 s3” and look for a component that allows you to upload files to S3 if you don’t want to write it yourself.