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: 
Here is a fix for this issue to enable you get the URL of S3 file as suggested by this [link](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3.html#generating-presigned-urls). You basically have to generate a pre-signed URL for each S3 object you wish to provide access to. See the code below:

```
import boto3

# Get the service client.
s3 = boto3.client('s3')

# Generate the URL to get 'key-name' from 'bucket-name'
url = s3.generate_presigned_url(
    ClientMethod='get_object',
    Params={
        'Bucket': '<bucket-name>',
        'Key': '<key-name>'
    }
)

```

Change the `<bucket-name>` and `<key-name>` to your S3 bucket and the name of the file that was uploaded.
This is proper sequence with python formatter:

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

```