Skip to content

Commit 96e5bea

Browse files
authored
Switch to AWS' dual-stack S3 URLs (#2035)
The default AWS S3 URLs only support IPv4, whereas the dual-stack URLs support both IPv4 and IPv6: https://docs.aws.amazon.com/AmazonS3/latest/API/ipv6-access.html https://docs.aws.amazon.com/AmazonS3/latest/API/dual-stack-endpoints.html By switching to the dual-stack URLs, it means systems that support IPv6 will now use it instead of IPv4, which is helpful in IPv6 environments where IPv4 traffic has to fall back to being routed via NAT gateways (which has performance and ingress cost implications). See also: https://salesforce-internal.slack.com/archives/C01R6FJ738U/p1770827176094169 GUS-W-21335961.
1 parent 8eaa83c commit 96e5bea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [Unreleased]
44

5+
- Changed the S3 URL used to download Python to use AWS' dual-stack (IPv6 compatible) endpoint. ([#2035](https://github.com/heroku/heroku-buildpack-python/pull/2035))
56

67
## [v335] - 2026-02-10
78

lib/python.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# however, it helps Shellcheck realise the options under which these functions will run.
55
set -euo pipefail
66

7-
S3_BASE_URL="https://heroku-buildpack-python.s3.us-east-1.amazonaws.com"
7+
S3_BASE_URL="https://heroku-buildpack-python.s3.dualstack.us-east-1.amazonaws.com"
88

99
function python::install() {
1010
local build_dir="${1}"
@@ -28,7 +28,7 @@ function python::install() {
2828
local ubuntu_version="${stack/heroku-/}.04"
2929
local arch
3030
arch=$(dpkg --print-architecture)
31-
# e.g.: https://heroku-buildpack-python.s3.us-east-1.amazonaws.com/python-3.13.0-ubuntu-24.04-amd64.tar.zst
31+
# e.g.: https://heroku-buildpack-python.s3.dualstack.us-east-1.amazonaws.com/python-3.14.0-ubuntu-24.04-amd64.tar.zst
3232
local python_url="${S3_BASE_URL}/python-${python_full_version}-ubuntu-${ubuntu_version}-${arch}.tar.zst"
3333

3434
local error_log
@@ -117,7 +117,7 @@ function python::install() {
117117
Then try building again to see if the error resolves itself.
118118
EOF
119119
build_data::set_string "failure_reason" "install-python"
120-
# e.g.: 'curl: (6) Could not resolve host: heroku-buildpack-python.s3.us-east-1.amazonaws.com'
120+
# e.g.: 'curl: (6) Could not resolve host: heroku-buildpack-python.s3.dualstack.us-east-1.amazonaws.com'
121121
build_data::set_string "failure_detail" "$(head --lines=1 "${error_log}" || true)"
122122
fi
123123

0 commit comments

Comments
 (0)