View Source Dynamo.Client (Dynamo v0.2.0)
Low-level DynamoDB HTTP client: SigV4 signing, retries with jittered exponential backoff, error normalisation and telemetry.
You normally don't call this directly – Dynamo.Repo does. It is exposed
for tooling (mix tasks) and for people who want to send raw requests.
client = Dynamo.Client.new(region: "eu-west-1", credentials: creds)
Dynamo.Client.request(client, "ListTables", %{})
#=> {:ok, %{"TableNames" => [...]}}Options
:region– required:endpoint– full URL; defaults tohttps://dynamodb.<region>.amazonaws.com:search_endpoint– endpoint forSearchVectors, which AWS serves from a separate host; defaults tohttps://search-dynamodb.<region>.amazonaws.com. When a custom:endpointis given (DynamoDB Local, a proxy), it is used for search too unless:search_endpointis set explicitly.:credentials–%Dynamo.Credentials{}or{:cache, pid_or_name}of aDynamo.Credentials.Cache(used by repos so credentials refresh automatically):max_retries– default 3 (only retryable errors are retried):base_backoff_ms– default 50; delay = random(0, base * 2^attempt) capped at:max_backoff_ms(default 5_000):receive_timeout– default 30_000:connect_timeout– default 5_000:req_options– extra options merged into everyReqcall (e.g.plug:for tests):telemetry_prefix– default[:dynamo]
Telemetry
[prefix, :request, :start | :stop | :exception] with measurements
%{duration: native} on stop and metadata:
%{action: "Query", table: "app" | nil, attempt: 1, result: :ok | :error,
error: %Dynamo.Error{} | nil, status: 200, consumed_capacity: map | nil}
Summary
Functions
Builds a client. Raises on missing :region or :credentials.
Sends a DynamoDB action. Returns the decoded JSON body or a normalised error.