Skip to content

[Documentation] Add virtual-hosted-style addressing to presigned URL documentation examples#4768

Open
adev-code wants to merge 1 commit intoboto:developfrom
adev-code:doc_presignexample
Open

[Documentation] Add virtual-hosted-style addressing to presigned URL documentation examples#4768
adev-code wants to merge 1 commit intoboto:developfrom
adev-code:doc_presignexample

Conversation

@adev-code
Copy link
Copy Markdown
Contributor

Description

Presigned URLs generated without addressing_style='virtual' use the legacy
global endpoint (bucket.s3.amazonaws.com), which returns
SignatureDoesNotMatch or IllegalLocationConstraintException errors for S3
buckets in newer Regions (e.g., eu-north-1, il-central-1).

Changes

  • Updated the recommendation text to include virtual-hosted-style addressing
  • Added s3={'addressing_style': 'virtual'} to the Config in all three
    code examples: create_presigned_url, create_presigned_url_expanded,
    and create_presigned_post

Testing

Screenshot 2026-04-15 at 2 08 51 PM Screenshot 2026-04-15 at 2 09 07 PM Screenshot 2026-04-15 at 2 09 18 PM

legacy global endpoint (bucket.s3.amazonaws.com), which returns errors
for S3 buckets in Regions launched after March 20, 2019.

Updated all three code examples (create_presigned_url,
create_presigned_url_expanded, create_presigned_post) to include
s3={'addressing_style': 'virtual'} in the Config, and updated the
recommendation text to mention virtual-hosted-style addressing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant