S3 / Client / generate_presigned_url

generate_presigned_url

S3.Client.generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Warning

For backwards compatibility, S3 presigned URLs use Signature Version 2 by default in regions where S3 supports it. As a result, some Params entries are not signed. Some headers, including the conditionals and Range, are also silently dropped.

It is recommended to configure the S3 client with Signature Version 4 by setting signature_version='s3v4' in the client’s Config.

Parameters:
  • ClientMethod (string) – The client method to presign for

  • Params (dict) – The parameters normally passed to ClientMethod.

  • ExpiresIn (int) – The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)

  • HttpMethod (string) – The http method to use on the generated url. By default, the http method is whatever is used in the method’s model.

Returns:

The presigned url