Skip to content

Commit

Permalink
Merge pull request #1000 from mmzx/quickie
Browse files Browse the repository at this point in the history
Add some fips endpoints. Perhaps a fix for the partition regex.
  • Loading branch information
bernardd authored Oct 28, 2023
2 parents 136eea3 + 40388d0 commit 476e3f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lib/ex_aws/config/defaults.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ defmodule ExAws.Config.Defaults do
end

@partitions [
{~r/^(us|eu|af|ap|sa|ca|me)\-\w+\-\d+$/, "aws"},
{~r/^(us|eu|af|ap|sa|ca|me)\-\w+-\d?-?\w+$/, "aws"},
{~r/^cn\-\w+\-\d+$/, "aws-cn"},
{~r/^us\-gov\-\w+\-\d+$/, "aws-us-gov"}
]
Expand Down Expand Up @@ -144,7 +144,6 @@ defmodule ExAws.Config.Defaults do
defp do_host(partition, service_slug, region) do
partition = @partition_data |> Map.fetch!(partition)
partition_name = partition["partition"]

service = service_map(service_slug)

partition
Expand Down
13 changes: 13 additions & 0 deletions priv/endpoints.exs
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,10 @@
"eu-north-1" => %{},
"sa-east-1" => %{},
"us-east-1" => %{},
"us-east-1-fips" => %{
"hostname" => "kms-fips.us-east-1.amazonaws.com",
"credentialScope" => %{"region" => "us-east-1"}
},
"us-east-2" => %{},
"us-west-1" => %{},
"us-west-2" => %{}
Expand Down Expand Up @@ -1036,6 +1040,11 @@
"eu-north-1" => %{},
"sa-east-1" => %{},
"us-east-1" => %{"sslCommonName" => "{service}.{dnsSuffix}"},
"us-east-1-fips" => %{
"sslCommonName" => "{service}.{dnsSuffix}",
"hostname" => "rds-fips.us-east-1.amazonaws.com",
"credentialScope" => %{"region" => "us-east-1"}
},
"us-east-2" => %{},
"us-west-1" => %{},
"us-west-2" => %{}
Expand Down Expand Up @@ -1443,6 +1452,10 @@
"hostname" => "s3.sa-east-1.amazonaws.com",
"signatureVersions" => ["s3", "s3v4"]
},
"us-east-1-fips" => %{
"hostname" => "s3-fips.us-east-1.amazonaws.com",
"credentialScope" => %{"region" => "us-east-1"}
},
"us-east-1" => %{
"hostname" => "s3.amazonaws.com",
"signatureVersions" => ["s3", "s3v4"]
Expand Down

0 comments on commit 476e3f0

Please sign in to comment.