The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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, see What is AWS Lambda (http://docs.aws.amazon.com/lambda/latest/dg/welcome.html), and for information about how the service works, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html) in the AWS Lambda Developer Guide.

For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31

METHODS

AddPermission

Action => Str
FunctionName => Str
Principal => Str
StatementId => Str
[EventSourceToken => Str]
[Qualifier => Str]
[RevisionId => 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 a 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 Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html).

If you are using versioning, the permissions you add are specific to the Lambda function version or alias you specify in the AddPermission request via the Qualifier parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

This operation requires permission for the lambda:AddPermission action.

CreateAlias

FunctionName => Str
FunctionVersion => Str
Name => Str
[Description => Str]
[RoutingConfig => Paws::Lambda::AliasRoutingConfiguration]

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

Returns: a Paws::Lambda::AliasConfiguration instance

Creates an alias that points to the specified Lambda function version. For more information, see Introduction to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).

Alias names are unique for a given function. This requires permission for the lambda:CreateAlias action.

CreateEventSourceMapping

EventSourceArn => Str
FunctionName => Str
StartingPosition => Str
[BatchSize => Int]
[Enabled => Bool]
[StartingPositionTimestamp => Str]

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 association between a stream source and a Lambda function is called the event source mapping.

You provide mapping information (for example, which stream to read from and which Lambda function to invoke) in the request body.

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

If you are using versioning, you can specify a specific function version or an alias via the function name parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

This operation requires permission for the lambda:CreateEventSourceMapping action.

CreateFunction

Code => Paws::Lambda::FunctionCode
FunctionName => Str
Handler => Str
Role => Str
Runtime => Str
[DeadLetterConfig => Paws::Lambda::DeadLetterConfig]
[Description => Str]
[Environment => Paws::Lambda::Environment]
[KMSKeyArn => Str]
[MemorySize => Int]
[Publish => Bool]
[Tags => Paws::Lambda::Tags]
[Timeout => Int]
[TracingConfig => Paws::Lambda::TracingConfig]
[VpcConfig => Paws::Lambda::VpcConfig]

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.

If you are using versioning, you can also publish a version of the Lambda function you are creating using the Publish parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

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 the specified Lambda function alias. For more information, see Introduction to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).

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 are using the versioning feature and you don't specify a function version in your DeleteFunction request, AWS Lambda will delete the function, including all its versions, and any aliases pointing to the function versions. To delete a specific function version, you must provide the function version via the Qualifier parameter. For information about function versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

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

This operation requires permission for the lambda:DeleteFunction action.

DeleteFunctionConcurrency

FunctionName => Str

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

Returns: nothing

Removes concurrent execution limits from this function. For more information, see concurrent-executions.

GetAccountSettings

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

Returns: a Paws::Lambda::GetAccountSettingsResponse instance

Returns a customer's account settings.

You can use this operation to retrieve Lambda limits information, such as code size and concurrency limits. For more information about limits, see AWS Lambda Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). You can also retrieve resource usage statistics, such as code storage usage and function count.

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 (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).

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 (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

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.

If you are using the versioning feature, you can retrieve this information for a specific function version by using the optional Qualifier parameter and specifying the function version or alias that points to it. 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 (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

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 associated with the specified Lambda function.

If you are using the versioning feature, you can get the resource policy associated with the specific Lambda function version or alias by specifying the version or alias name using the Qualifier parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

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. For an example, see Create the Lambda Function and Test It Manually (http://docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-function.html#with-dbb-invoke-manually).

If you are using the versioning feature, you can invoke the specific function version by providing function version or alias name that is pointing to the function version using the Qualifier parameter in the request. If you don't provide the Qualifier parameter, the $LATEST version of the Lambda function is invoked. Invocations occur at least once in response to an event and functions must be idempotent to handle this. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

This operation requires permission for the lambda:InvokeFunction action.

The TooManyRequestsException noted below will return the following: ConcurrentInvocationLimitExceeded will be returned if you have no functions with reserved concurrency and have exceeded your account concurrent limit or if a function without reserved concurrency exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded will be returned when a function with reserved concurrency exceeds its configured concurrency limit.

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 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 (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).

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 CreateEventSourceMapping (see CreateEventSourceMapping).

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

If you are using the versioning feature, you can get list of event source mappings for a specific Lambda function version or an alias as described in the FunctionName parameter. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

This operation requires permission for the lambda:ListEventSourceMappings action.

ListFunctions

[FunctionVersion => Str]
[Marker => Str]
[MasterRegion => 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.

If you are using the versioning feature, you can list all of your functions or only $LATEST versions. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

ListTags

Resource => Str

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

Returns: a Paws::Lambda::ListTagsResponse instance

Returns a list of tags assigned to a function when supplied the function ARN (Amazon Resource Name). For more information on Tagging, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) in the AWS Lambda Developer Guide.

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. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

PublishVersion

FunctionName => Str
[CodeSha256 => Str]
[Description => Str]
[RevisionId => 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 $LATEST. That is, AWS Lambda takes a snapshot of the function code and configuration information from $LATEST and publishes a new version. The code and configuration cannot be modified after publication. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

PutFunctionConcurrency

FunctionName => Str
ReservedConcurrentExecutions => Int

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

Returns: a Paws::Lambda::Concurrency instance

Sets a limit on the number of concurrent executions available to this function. It is a subset of your account's total concurrent execution limit per region. Note that Lambda automatically reserves a buffer of 100 concurrent executions for functions without any reserved concurrency limit. This means if your account limit is 1000, you have a total of 900 available to allocate to individual functions. For more information, see concurrent-executions.

RemovePermission

FunctionName => Str
StatementId => Str
[Qualifier => Str]
[RevisionId => 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 added the permission.

If you are using versioning, the permissions you remove are specific to the Lambda function version or alias you specify in the AddPermission request via the Qualifier parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

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.

TagResource

Resource => Str
Tags => Paws::Lambda::Tags

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

Returns: nothing

Creates a list of tags (key-value pairs) on the Lambda function. Requires the Lambda function ARN (Amazon Resource Name). If a key is specified without a value, Lambda creates a tag with the specified key and a value of null. For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) in the AWS Lambda Developer Guide.

UntagResource

Resource => Str
TagKeys => ArrayRef[Str|Undef]

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

Returns: nothing

Removes tags from a Lambda function. Requires the function ARN (Amazon Resource Name). For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) in the AWS Lambda Developer Guide.

UpdateAlias

FunctionName => Str
Name => Str
[Description => Str]
[FunctionVersion => Str]
[RevisionId => Str]
[RoutingConfig => Paws::Lambda::AliasRoutingConfiguration]

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

Returns: a Paws::Lambda::AliasConfiguration instance

Using this API you can update the function version to which the alias points and the alias description. For more information, see Introduction to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).

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.

If you are using the versioning feature, you can update the event source mapping to map to a specific Lambda function version or alias as described in the FunctionName parameter. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

If you disable the event source mapping, AWS Lambda stops polling. If you enable again, it will resume polling from the time it had stopped polling, so you don't lose processing of any records. However, if you delete event source mapping and create it again, it will reset.

This operation requires permission for the lambda:UpdateEventSourceMapping action.

UpdateFunctionCode

FunctionName => Str
[DryRun => Bool]
[Publish => Bool]
[RevisionId => Str]
[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.

If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

This operation requires permission for the lambda:UpdateFunctionCode action.

UpdateFunctionConfiguration

FunctionName => Str
[DeadLetterConfig => Paws::Lambda::DeadLetterConfig]
[Description => Str]
[Environment => Paws::Lambda::Environment]
[Handler => Str]
[KMSKeyArn => Str]
[MemorySize => Int]
[RevisionId => Str]
[Role => Str]
[Runtime => Str]
[Timeout => Int]
[TracingConfig => Paws::Lambda::TracingConfig]
[VpcConfig => Paws::Lambda::VpcConfig]

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.

If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).

This operation requires permission for the lambda:UpdateFunctionConfiguration action.

PAGINATORS

Paginator methods are helpers that repetively call methods that return partial results

ListAllAliases(sub { },FunctionName => Str, [FunctionVersion => Str, Marker => Str, MaxItems => Int])

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

If passed a sub as first parameter, it will call the sub for each element found in :

 - Aliases, passing the object as the first parameter, and the string 'Aliases' as the second parameter 

If not, it will return a a Paws::Lambda::ListAliasesResponse instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

ListAllEventSourceMappings(sub { },[EventSourceArn => Str, FunctionName => Str, Marker => Str, MaxItems => Int])

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

If passed a sub as first parameter, it will call the sub for each element found in :

 - EventSourceMappings, passing the object as the first parameter, and the string 'EventSourceMappings' as the second parameter 

If not, it will return a a Paws::Lambda::ListEventSourceMappingsResponse instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

ListAllFunctions(sub { },[FunctionVersion => Str, Marker => Str, MasterRegion => Str, MaxItems => Int])

ListAllFunctions([FunctionVersion => Str, Marker => Str, MasterRegion => Str, MaxItems => Int])

If passed a sub as first parameter, it will call the sub for each element found in :

 - Functions, passing the object as the first parameter, and the string 'Functions' as the second parameter 

If not, it will return a a Paws::Lambda::ListFunctionsResponse instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

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