Insight Horizon
environment /

generate_presigned_post - Boto3 1.34.74 documentation

  • Bucket (string) – The name of the bucket to presign the post to. Note that bucket related conditions should not be included in theconditions parameter.

  • Key (string) – Key name, optionally add ${filename} to the end to attach the submitted filename. Note that key related conditions and fields are filled out for you and should not be included in theFields or Conditions parameter.

  • Fields (dict) –

    A dictionary of prefilled form fields to build on top of. Elements that may be included are acl, Cache-Control, Content-Type, Content-Disposition, Content-Encoding, Expires, success_action_redirect, redirect, success_action_status, and x-amz-meta-.

    Note that if a particular element is included in the fields dictionary it will not be automatically added to the conditions list. You must specify a condition for the element as well.

  • Conditions (list) –

    A list of conditions to include in the policy. Each element can be either a list or a structure. For example:

    [

    {“acl”: “public-read”}, [“content-length-range”, 2, 5], [“starts-with”, “$success_action_redirect”, “”]

    ]

    Conditions that are included may pertain to acl, content-length-range, Cache-Control, Content-Type, Content-Disposition, Content-Encoding, Expires, success_action_redirect, redirect, success_action_status, and/or x-amz-meta-.

    Note that if you include a condition, you must specify the a valid value in the fields dictionary as well. A value will not be added automatically to the fields dictionary based on the conditions.

  • ExpiresIn (int) – The number of seconds the presigned post is valid for.