View Source AwsRdsCAStore (AwsRdsCAStore v1.2.0)

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"
Link to this function

ssl_opts(url_or_hostname)

View Source

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: true,
  ssl_opts: AwsRdsCAStore.ssl_opts(database_url),
  pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
  socket_options: maybe_ipv6