How to get the URL of a file on AWS S3 using aws-sdk?

前端 未结 3 1396
春和景丽
春和景丽 2021-01-03 23:57

I\'m using an AWS Lambda function to create a file and save it to my bucket on S3, it is working fine. After executing the putObject method, I get a data<

3条回答
  •  太阳男子
    2021-01-04 00:22

    You can do an another call with this:

    var params = {Bucket: 'bucket', Key: 'key'};
    s3.getSignedUrl('putObject', params, function (err, url) {
      console.log('The URL is', url);
    });
    

提交回复
热议问题