Skip to content

Commit fad0557

Browse files
authored
Switch to AWS' dual-stack S3 URLs (#513)
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-21336806.
1 parent 7586369 commit fad0557

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Changed the S3 URL used to download Python to use AWS' dual-stack (IPv6 compatible) endpoint. ([#513](https://github.com/heroku/buildpacks-python/pull/513))
13+
1014
## [5.0.0] - 2026-02-10
1115

1216
### Changed

src/python_version.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl PythonVersion {
9999
..
100100
} = target;
101101
format!(
102-
"https://heroku-buildpack-python.s3.us-east-1.amazonaws.com/python-{major}.{minor}.{patch}-{distro_name}-{distro_version}-{arch}.tar.zst"
102+
"https://heroku-buildpack-python.s3.dualstack.us-east-1.amazonaws.com/python-{major}.{minor}.{patch}-{distro_name}-{distro_version}-{arch}.tar.zst"
103103
)
104104
}
105105
}
@@ -231,7 +231,7 @@ mod tests {
231231
distro_name: "ubuntu".to_string(),
232232
distro_version: "22.04".to_string()
233233
}),
234-
"https://heroku-buildpack-python.s3.us-east-1.amazonaws.com/python-3.11.0-ubuntu-22.04-amd64.tar.zst"
234+
"https://heroku-buildpack-python.s3.dualstack.us-east-1.amazonaws.com/python-3.11.0-ubuntu-22.04-amd64.tar.zst"
235235
);
236236
assert_eq!(
237237
PythonVersion::new(3, 12, 2).url(&Target {
@@ -241,7 +241,7 @@ mod tests {
241241
distro_name: "ubuntu".to_string(),
242242
distro_version: "24.04".to_string()
243243
}),
244-
"https://heroku-buildpack-python.s3.us-east-1.amazonaws.com/python-3.12.2-ubuntu-24.04-arm64.tar.zst"
244+
"https://heroku-buildpack-python.s3.dualstack.us-east-1.amazonaws.com/python-3.12.2-ubuntu-24.04-arm64.tar.zst"
245245
);
246246
}
247247

0 commit comments

Comments
 (0)