ExAws.Lambda (ExAws.Lambda v2.2.0)

View Source

Operations on ExAws Lambda.

Summary

Functions

Adds a permission to the access policy associated with the specified AWS Lambda function.

Delete an event source mapping.

Delete a lambda function.

Get an event source mapping.

Get a function.

Get a function configuration.

Get a function access policy.

Invoke a lambda function asynchronously.

List event source mappings.

List functions.

Remove individual permissions from an function's access policy.

Tag the Lambda resource.

Types

add_permission_opts()

@type add_permission_opts() :: [source_account: binary(), source_arn: binary()]

create_event_source_mapping_opts()

@type create_event_source_mapping_opts() :: [
  batch_size: pos_integer(),
  enabled: boolean()
]

create_function_opts()

@type create_function_opts() :: [
  description: binary(),
  memory_size: pos_integer(),
  timeout: pos_integer()
]

invoke_opts()

@type invoke_opts() :: [
  invocation_type: :event | :request_response | :dry_run,
  log_type: :none | :tail,
  qualifier: String.t(),
  parser: fun()
]

list_event_source_mappings_opts()

@type list_event_source_mappings_opts() :: [
  event_source_arn: binary(),
  function_name: binary(),
  marker: binary(),
  max_items: pos_integer()
]

list_functions_opts()

@type list_functions_opts() :: [marker: binary(), max_items: pos_integer()]

starting_position_vals()

@type starting_position_vals() :: :trim_horizon | :latest

Functions

add_permission(function_name, principal, action, statement_id, opts \\ [])

@spec add_permission(
  function_name :: binary(),
  principal :: binary(),
  action :: binary(),
  statement_id :: binary(),
  opts :: add_permission_opts()
) :: ExAws.Operation.JSON.t()

Adds a permission to the access policy associated with the specified AWS Lambda function.

Action pattern: (lambda:[]|lambda:[a-zA-Z]+|[])

create_event_source_mapping(function_name, event_source_arn, starting_position, opts \\ [])

@spec create_event_source_mapping(
  function_name :: binary(),
  event_source_arn :: binary(),
  starting_position :: starting_position_vals(),
  opts :: create_event_source_mapping_opts()
) :: ExAws.Operation.JSON.t()

Creates a stream based event source for a function.

create_function(function_name, handler, zipfile_or_container_uri, opts \\ [])

@spec create_function(
  function_name :: binary(),
  handler :: binary(),
  zipfile_or_container_uri :: binary(),
  opts :: create_function_opts()
) :: ExAws.Operation.JSON.t()

Create a function.

Runtime defaults to nodejs, as that is the only one available.

If options contains package_type, then if that is "Image" the function creates a container function; else it will create a zipfile-based function. For a container, the handler argument will be ignored.

delete_event_source_mapping(source_mapping_uuid)

@spec delete_event_source_mapping(source_mapping_uuid :: binary()) ::
  ExAws.Operation.JSON.t()

Delete an event source mapping.

delete_function(function_name)

@spec delete_function(function_name :: binary()) :: ExAws.Operation.JSON.t()

Delete a lambda function.

get_event_source_mapping(source_mapping_uuid)

@spec get_event_source_mapping(source_mapping_uuid :: binary()) ::
  ExAws.Operation.JSON.t()

Get an event source mapping.

get_function(function_name)

@spec get_function(function_name :: binary()) :: ExAws.Operation.JSON.t()

Get a function.

get_function_configuration(function_name)

@spec get_function_configuration(function_name :: binary()) ::
  ExAws.Operation.JSON.t()

Get a function configuration.

get_policy(function_name)

@spec get_policy(function_name :: binary()) :: ExAws.Operation.JSON.t()

Get a function access policy.

invoke(function_name, payload, client_context, opts \\ [])

@spec invoke(
  function_name :: binary(),
  payload :: map(),
  client_context :: map(),
  opts :: invoke_opts()
) :: ExAws.Operation.JSON.t() | ExAws.Operation.RestQuery.t()

Invoke a lambda function.

invoke_async(function_name, args)

@spec invoke_async(function_name :: binary(), args :: map()) ::
  ExAws.Operation.JSON.t()

Invoke a lambda function asynchronously.

list_event_source_mappings(opts \\ [])

@spec list_event_source_mappings(opts :: list_event_source_mappings_opts()) ::
  ExAws.Operation.JSON.t()

List event source mappings.

list_functions(opts \\ [])

@spec list_functions(opts :: list_functions_opts()) :: ExAws.Operation.JSON.t()

List functions.

remove_permission(function_name, statement_id)

@spec remove_permission(function_name :: binary(), statement_id :: binary()) ::
  ExAws.Operation.JSON.t()

Remove individual permissions from an function's access policy.

tag_resource(function_arn, tags)

@spec tag_resource(function_name :: binary(), tags :: map()) ::
  ExAws.Operation.JSON.t()

Tag the Lambda resource.

update_event_source_mapping(uuid, attrs_to_update)

@spec update_event_source_mapping(uuid :: binary(), attrs_to_update :: map()) ::
  ExAws.Operation.JSON.t()

Update event source mapping.

update_function_code(function_name, zipfile)

@spec update_function_code(function_name :: binary(), zipfile :: binary()) ::
  ExAws.Operation.JSON.t()

Update function code.

update_function_configuration(function_name, configuration)

@spec update_function_configuration(function_name :: binary(), configuration :: map()) ::
  ExAws.Operation.JSON.t()

Update a function configuration.