How to Generate a Presigned S3 URL via AWS CLI

前端 未结 5 1339
误落风尘
误落风尘 2021-02-01 04:15

Is there a way to create presigned URL for objects in S3 bucket using AWS CLI?

I know that could be done using SDK, but is it possible with CLI?

I found this on

5条回答
  •  失恋的感觉
    2021-02-01 05:00

    if you do aws s3 presign s3://bucket-address/my-file.csv

    you get back url. Then when you pass it to wget make sure you wrap it with apostrophes

    wget 'https://bucket-address.s3.aws.com/xbxxxxxxxxxxxxxxx'
    

    if you just do without apostrophes you will get 403 wget https://bucket-address.s3.aws.com/xbxxxxxxxxxxxxxxx

    I'm describing more in https://blog.eq8.eu/til/transfer-file-to-server.html

提交回复
热议问题