Question: I'm just a new with **boto3** and i can not understand how i can get URL link for file that i have just uploaded to s3 amazon. 

Please clarify.

Thank you

```
import boto3

s3 = boto3.resource('s3')

data = open ('file.xlsx', 'rb')
s3.Bucket ('dimxxx1').put_object (Key='file.xlsx', Body=data)

```

Answer: 
First, the better way to upload would be:

```
import boto3
s3 = boto3.resource('s3')
s3.Bucket('dimxxx1').upload_file('/tmp/file.xlsx', 'file.xlsx')

```

To obtain the URL, you can construct it from the basic elements:

```
http://s3-REGION-.amazonaws.com/BUCKET-NAME/KEY

```

For example:

```
http://s3-ap-southeast-2.amazonaws.com/dimxxx1/file.xlsx

```
This is proper sequence with python formatter:

```
url = f"https://s3.{region}.amazonaws.com/{bucket}/{folder}...N/{file_name}"

```