AWS RDS CA certificate store for Elixir and Erlang. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html
Based on and derived from https://hex.pm/packages/castore
In your mix.exs
:
def deps do
[
{:aws_rds_castore, "~> 1.1"}
]
end
Then, run $ mix deps.get
.
In your rebar.config
:
{deps, [
{aws_rds_castore, "~> 1.1"}
]}.
Then, run $ rebar3 get-deps
.
# In runtime.exs:
config :my_app, MyApp.Repo,
url: database_url,
ssl: AwsRdsCAStore.ssl_opts(database_url),
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
socket_options: maybe_ipv6
See the documentation.
PoolConfig = #{pool_size => 10,
host => Host,
database => "test",
user => "test",
ssl => true,
ssl_options => aws_rds_castore:ssl_opts(Host)},
pgo:start_pool(default, PoolConfig).
Every time there is an update to the AWS RDS CA certificate store, we'll release a new patch version of the library. For example, 1.1.12
→ 1.1.13
.
If you want to locally update the CA certificate store file bundled with this library, run the mix aws_rds_ca_store.certdata
from the root of this library.
Copyright 2022 Bram Verburg
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.