View Source AwsRdsCAStore (AwsRdsCAStore v1.2.2)
Functionality to retrieve the AWS RDS CA certificate store and use it in the DB connection configuration.
Link to this section Summary
Functions
Returns the path to the AWS RDS CA certificate store PEM file.
Returns a set of :ssl
transport options for certificate verification.
Link to this section Functions
@spec file_path() :: Path.t()
Returns the path to the AWS RDS CA certificate store PEM file.
examples
Examples
AwsRdsCAStore.file_path()
#=> /Users/me/aws_rds_castore/_build/dev/lib/aws_rds_castore/priv/global-bundle.pem"
Returns a set of :ssl
transport options for certificate verification.
Accepts an Ecto database URI or a hostname.
examples
Examples
# In runtime.exs:
config :my_app, MyApp.Repo,
url: database_url,
ssl: AwsRdsCAStore.ssl_opts(database_url),
### With older Postgrex versions:
# ssl: true,
# ssl_opts: AwsRdsCAStore.ssl_opts(database_url),
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
socket_options: maybe_ipv6