How to get AWS S3 object Location/URL using pyhton 3.8?
问题 I am uploading a file to AWS S3 using AWS Lambda function (Python3.8) with the following code. file_obj = open(filename, 'rb') s3_upload = s3.put_object( Bucket="aaa", Key="aaa.png", Body=file_obj) return { 'statusCode': 200, 'body': json.dumps("Executed Successfully") } I want to get the location/url of the S3 object in return . In Node.js we use the .location parameter for getting the object location/url. Any idea how to do this using python 3.8? 回答1: The url of S3 objects has known format