NAME

Paws::Lambda - Perl Interface to AWS AWS Lambda

SYNOPSIS

use Paws;

my $obj = Paws->service('Lambda');
my $res = $obj->Method(
  Arg1 => $val1,
  Arg2 => [ 'V1', 'V2' ],
  # if Arg3 is an object, the HashRef will be used as arguments to the constructor
  # of the arguments type
  Arg3 => { Att1 => 'Val1' },
  # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
  # the constructor of the arguments type
  Arg4 => [ { Att1 => 'Val1'  }, { Att1 => 'Val2' } ],
);

DESCRIPTION

AWS Lambda

Overview

This is the AWS Lambda API Reference. The AWS Lambda Developer Guide provides additional information. For the service overview, go to What is AWS Lambda, and for information about how the service works, go to AWS Lambda: How it Works in the AWS Lambda Developer Guide.

METHODS

AddPermission(Action => Str, FunctionName => Str, Principal => Str, StatementId => Str, [Qualifier => Str, SourceAccount => Str, SourceArn => Str])

Each argument is described in detail in: Paws::Lambda::AddPermission

Returns: a Paws::Lambda::AddPermissionResponse instance

Adds a permission to the resource policy associated with the specified
AWS Lambda function. You use resource policies to grant permissions to
event sources that use "push" model. In "push" model, event sources
(such as Amazon S3 and custom applications) invoke your Lambda
function. Each permission you add to the resource policy allows an
event source, permission to invoke the Lambda function.

For information about the push model, see AWS Lambda: How it Works.

If you are using versioning feature (see AWS Lambda Function Versioning and Aliases), a Lambda function can have multiple ARNs that can be used to invoke the function. Note that, each permission you add to resource policy using this API is specific to an ARN, specified using the Qualifier parameter

This operation requires permission for the lambda:AddPermission action.

CreateAlias(FunctionName => Str, FunctionVersion => Str, Name => Str, [Description => Str])

Each argument is described in detail in: Paws::Lambda::CreateAlias

Returns: a Paws::Lambda::AliasConfiguration instance

Creates an alias to the specified Lambda function version. For more
information, see Introduction to AWS Lambda Aliases

This requires permission for the lambda:CreateAlias action.

CreateEventSourceMapping(EventSourceArn => Str, FunctionName => Str, StartingPosition => Str, [BatchSize => Int, Enabled => Bool])

Each argument is described in detail in: Paws::Lambda::CreateEventSourceMapping

Returns: a Paws::Lambda::EventSourceMappingConfiguration instance

Identifies a stream as an event source for a Lambda function. It can be
either an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS
Lambda invokes the specified function when records are posted to the
stream.

This is the pull model, where AWS Lambda invokes the function. For more information, go to AWS Lambda: How it Works in the AWS Lambda Developer Guide.

This association between an Amazon Kinesis stream and a Lambda function is called the event source mapping. You provide the configuration information (for example, which stream to read from and which Lambda function to invoke) for the event source mapping in the request body.

Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be associated with multiple AWS Lambda function. A given Lambda function can be associated with multiple AWS event sources.

This operation requires permission for the lambda:CreateEventSourceMapping action.

CreateFunction(Code => Paws::Lambda::FunctionCode, FunctionName => Str, Handler => Str, Role => Str, Runtime => Str, [Description => Str, MemorySize => Int, Publish => Bool, Timeout => Int])

Each argument is described in detail in: Paws::Lambda::CreateFunction

Returns: a Paws::Lambda::FunctionConfiguration instance

Creates a new Lambda function. The function metadata is created from
the request parameters, and the code for the function is provided by a
.zip file in the request body. If the function name already exists, the
operation will fail. Note that the function name is case-sensitive.

This operation requires permission for the lambda:CreateFunction action.

DeleteAlias(FunctionName => Str, Name => Str)

Each argument is described in detail in: Paws::Lambda::DeleteAlias

Returns: nothing

Deletes specified Lambda function alias. For more information, see
Introduction to AWS Lambda Aliases

This requires permission for the lambda:DeleteAlias action.

DeleteEventSourceMapping(UUID => Str)

Each argument is described in detail in: Paws::Lambda::DeleteEventSourceMapping

Returns: a Paws::Lambda::EventSourceMappingConfiguration instance

Removes an event source mapping. This means AWS Lambda will no longer
invoke the function for events in the associated source.

This operation requires permission for the lambda:DeleteEventSourceMapping action.

DeleteFunction(FunctionName => Str, [Qualifier => Str])

Each argument is described in detail in: Paws::Lambda::DeleteFunction

Returns: nothing

Deletes the specified Lambda function code and configuration.

If you don't specify a function version, AWS Lambda will delete the function, including all its versions, and any aliases pointing to the function versions.

When you delete a function the associated resource policy is also deleted. You will need to delete the event source mappings explicitly.

For information about function versioning, see AWS Lambda Function Versioning and Aliases.

This operation requires permission for the lambda:DeleteFunction action.

GetAlias(FunctionName => Str, Name => Str)

Each argument is described in detail in: Paws::Lambda::GetAlias

Returns: a Paws::Lambda::AliasConfiguration instance

Returns the specified alias information such as the alias ARN,
description, and function version it is pointing to. For more
information, see Introduction to AWS Lambda Aliases

This requires permission for the lambda:GetAlias action.

GetEventSourceMapping(UUID => Str)

Each argument is described in detail in: Paws::Lambda::GetEventSourceMapping

Returns: a Paws::Lambda::EventSourceMappingConfiguration instance

Returns configuration information for the specified event source
mapping (see CreateEventSourceMapping).

This operation requires permission for the lambda:GetEventSourceMapping action.

GetFunction(FunctionName => Str, [Qualifier => Str])

Each argument is described in detail in: Paws::Lambda::GetFunction

Returns: a Paws::Lambda::GetFunctionResponse instance

Returns the configuration information of the Lambda function and a
presigned URL link to the .zip file you uploaded with CreateFunction so
you can download the .zip file. Note that the URL is valid for up to 10
minutes. The configuration information is the same information you
provided as parameters when uploading the function.

Using the optional Qualifier parameter, you can specify a specific function version for which you want this information. If you don't specify this parameter, the API uses unqualified function ARN which return information about the $LATEST version of the Lambda function. For more information, see AWS Lambda Function Versioning and Aliases.

This operation requires permission for the lambda:GetFunction action.

GetFunctionConfiguration(FunctionName => Str, [Qualifier => Str])

Each argument is described in detail in: Paws::Lambda::GetFunctionConfiguration

Returns: a Paws::Lambda::FunctionConfiguration instance

Returns the configuration information of the Lambda function. This the
same information you provided as parameters when uploading the function
by using CreateFunction.

You can use the optional Qualifier parameter to retrieve configuration information for a specific Lambda function version. If you don't provide it, the API returns information about the $LATEST version of the function. For more information about versioning, see AWS Lambda Function Versioning and Aliases.

This operation requires permission for the lambda:GetFunctionConfiguration operation.

GetPolicy(FunctionName => Str, [Qualifier => Str])

Each argument is described in detail in: Paws::Lambda::GetPolicy

Returns: a Paws::Lambda::GetPolicyResponse instance

Returns the resource policy, containing a list of permissions that
apply to a specific to an ARN that you specify via the C<Qualifier>
paramter.

For informration about adding permissions, see AddPermission.

You need permission for the lambda:GetPolicy action.

Invoke(FunctionName => Str, [ClientContext => Str, InvocationType => Str, LogType => Str, Payload => Str, Qualifier => Str])

Each argument is described in detail in: Paws::Lambda::Invoke

Returns: a Paws::Lambda::InvocationResponse instance

Invokes a specific Lambda function version.

If you don't provide the Qualifier parameter, it uses the unqualified function ARN which results in invocation of the $LATEST version of the Lambda function (when you create a Lambda function, the $LATEST is the version). The AWS Lambda versioning and aliases feature allows you to publish multiple versions of a Lambda function and also create aliases for each function version. So each your Lambda function version can be invoked using multiple ARNs. For more information, see AWS Lambda Function Versioning and Aliases. Using the Qualifier parameter, you can specify a function version or alias name to invoke specific function version. If you specify function version, the API uses the qualified function ARN to invoke a specific function version. If you specify alias name, the API uses the alias ARN to invoke the function version to which the alias points.

This operation requires permission for the lambda:InvokeFunction action.

InvokeAsync(FunctionName => Str, InvokeArgs => Str)

Each argument is described in detail in: Paws::Lambda::InvokeAsync

Returns: a Paws::Lambda::InvokeAsyncResponse instance

This API is deprecated. We recommend you use C<Invoke> API (see
Invoke).

Submits an invocation request to AWS Lambda. Upon receiving the request, Lambda executes the specified function asynchronously. To see the logs generated by the Lambda function execution, see the CloudWatch logs console.

This operation requires permission for the lambda:InvokeFunction action.

ListAliases(FunctionName => Str, [FunctionVersion => Str, Marker => Str, MaxItems => Int])

Each argument is described in detail in: Paws::Lambda::ListAliases

Returns: a Paws::Lambda::ListAliasesResponse instance

Returns list of aliases created for a Lambda function. For each alias,
the response includes information such as the alias ARN, description,
alias name, and the function version to which it points. For more
information, see Introduction to AWS Lambda Aliases

This requires permission for the lambda:ListAliases action.

ListEventSourceMappings([EventSourceArn => Str, FunctionName => Str, Marker => Str, MaxItems => Int])

Each argument is described in detail in: Paws::Lambda::ListEventSourceMappings

Returns: a Paws::Lambda::ListEventSourceMappingsResponse instance

Returns a list of event source mappings you created using the
C<CreateEventSourceMapping> (see CreateEventSourceMapping), where you
identify a stream as an event source. This list does not include Amazon
S3 event sources.

For each mapping, the API returns configuration information. You can optionally specify filters to retrieve specific event source mappings.

This operation requires permission for the lambda:ListEventSourceMappings action.

ListFunctions([Marker => Str, MaxItems => Int])

Each argument is described in detail in: Paws::Lambda::ListFunctions

Returns: a Paws::Lambda::ListFunctionsResponse instance

Returns a list of your Lambda functions. For each function, the
response includes the function configuration information. You must use
GetFunction to retrieve the code for your function.

This operation requires permission for the lambda:ListFunctions action.

ListVersionsByFunction(FunctionName => Str, [Marker => Str, MaxItems => Int])

Each argument is described in detail in: Paws::Lambda::ListVersionsByFunction

Returns: a Paws::Lambda::ListVersionsByFunctionResponse instance

List all versions of a function.

PublishVersion(FunctionName => Str, [CodeSha256 => Str, Description => Str])

Each argument is described in detail in: Paws::Lambda::PublishVersion

Returns: a Paws::Lambda::FunctionConfiguration instance

Publishes a version of your function from the current snapshot of HEAD.
That is, AWS Lambda takes a snapshot of the function code and
configuration information from HEAD and publishes a new version. The
code and C<handler> of this specific Lambda function version cannot be
modified after publication, but you can modify the configuration
information.

RemovePermission(FunctionName => Str, StatementId => Str, [Qualifier => Str])

Each argument is described in detail in: Paws::Lambda::RemovePermission

Returns: nothing

You can remove individual permissions from an resource policy
associated with a Lambda function by providing a statement ID that you
provided when you addded the permission. The API removes corresponding
permission that is associated with the specific ARN identified by the
C<Qualifier> parameter.

Note that removal of a permission will cause an active event source to lose permission to the function.

You need permission for the lambda:RemovePermission action.

UpdateAlias(FunctionName => Str, Name => Str, [Description => Str, FunctionVersion => Str])

Each argument is described in detail in: Paws::Lambda::UpdateAlias

Returns: a Paws::Lambda::AliasConfiguration instance

Using this API you can update function version to which the alias
points to and alias description. For more information, see Introduction
to AWS Lambda Aliases

This requires permission for the lambda:UpdateAlias action.

UpdateEventSourceMapping(UUID => Str, [BatchSize => Int, Enabled => Bool, FunctionName => Str])

Each argument is described in detail in: Paws::Lambda::UpdateEventSourceMapping

Returns: a Paws::Lambda::EventSourceMappingConfiguration instance

You can update an event source mapping. This is useful if you want to
change the parameters of the existing mapping without losing your
position in the stream. You can change which function will receive the
stream records, but to change the stream itself, you must create a new
mapping.

This operation requires permission for the lambda:UpdateEventSourceMapping action.

UpdateFunctionCode(FunctionName => Str, [Publish => Bool, S3Bucket => Str, S3Key => Str, S3ObjectVersion => Str, ZipFile => Str])

Each argument is described in detail in: Paws::Lambda::UpdateFunctionCode

Returns: a Paws::Lambda::FunctionConfiguration instance

Updates the code for the specified Lambda function. This operation must
only be used on an existing Lambda function and cannot be used to
update the function configuration.

This operation requires permission for the lambda:UpdateFunctionCode action.

UpdateFunctionConfiguration(FunctionName => Str, [Description => Str, Handler => Str, MemorySize => Int, Role => Str, Timeout => Int])

Each argument is described in detail in: Paws::Lambda::UpdateFunctionConfiguration

Returns: a Paws::Lambda::FunctionConfiguration instance

Updates the configuration parameters for the specified Lambda function
by using the values provided in the request. You provide only the
parameters you want to change. This operation must only be used on an
existing Lambda function and cannot be used to update the function's
code.

This operation requires permission for the lambda:UpdateFunctionConfiguration action.

SEE ALSO

This service class forms part of Paws

BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues