Skip to main content

Init

Initializes a singleton AWS Client if one has not been initialized yet.

def Init(
ctx: context.Context,
cfg: *Config
) - > error

Initializes a singleton AWS Client if one has not been initialized yet. This ensures that only one instance of the AWS client is created and used throughout the application.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, allowing for cancellation and timeouts.
cfg*ConfigThe configuration object used to create the new AWS client.

Returns

TypeDescription
errorAn error if the client could not be initialized, otherwise nil.