Skip to content

Commit 158faa2

Browse files
authored
Merge pull request #178 from aws-beam/fix-global-endpoints
Fix endpoint creation for global endpoints
2 parents 3adb498 + 400ec31 commit 158faa2

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## [v0.14.1] - 2024-02-16
4+
- Fix endpoints for global AWS services
5+
36
## [v0.14.0] - 2024-01-05
47
- Add support for the ec2 protocol
58
- Add docs for multipart upload to S3

lib/aws/request.ex

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,19 @@ defmodule AWS.Request do
201201
%{global?: true, endpoint: endpoint} ->
202202
endpoint = resolve_endpoint_sufix(endpoint)
203203

204+
region =
205+
if metadata.credential_scope != nil do
206+
metadata.credential_scope
207+
else
208+
client.region
209+
end
210+
204211
build_final_endpoint(
205-
[to_string(metadata[:host_prefix]) <> metadata.endpoint_prefix, endpoint],
212+
[
213+
to_string(metadata[:host_prefix]) <> metadata.endpoint_prefix,
214+
region,
215+
endpoint
216+
],
206217
build_options
207218
)
208219

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule AWS.Mixfile do
22
use Mix.Project
33

4-
@version "0.14.0"
4+
@version "0.14.1"
55
@repo_url "https://github.com/aws-beam/aws-elixir"
66

77
def project do

0 commit comments

Comments
 (0)