Amazon Lambda Connector Reference¶
The following operations allow you to work with the Amazon Lambda Connector. Click an operation name to see parameter details and samples on how to use it.
Accounts¶
getAccountSettings
The getAccountSettings operation retrieves details about your account's limits and usage in an AWS Region. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionGetAccountSettings | API version for GetAccountSettings method. | Yes |
Sample configuration
<amazonlambda.getAccountSettings>
<apiVersionGetAccountSettings>{$ctx:apiVersionGetAccountSettings}</apiVersionGetAccountSettings>
</amazonlambda.getAccountSettings>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-2",
"blocking":"false",
"apiVersionGetAccountSettings": "2016-08-19"
}
Sample response
{
"AccountLimit": {
"CodeSizeUnzipped": 262144000,
"CodeSizeZipped": 52428800,
"ConcurrentExecutions": 1000,
"TotalCodeSize": 80530636800,
"UnreservedConcurrentExecutions": 1000,
"UnreservedConcurrentExecutionsMinimum": null
},
"AccountUsage": {
"FunctionCount": 1,
"TotalCodeSize": 176268666
},
"DeprecatedFeaturesAccess": null,
"HasFunctionWithDeprecatedRuntime": false,
"PreviewFeatures": null
}
Aliases¶
createAlias
The createAlias implementation of the POST operation creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version. You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionCreateAlias | API version for CreateAlias method. | Yes |
functionName | The name of the Lambda function that the alias invokes. | Yes |
createAliasDescription | The description of the alias. | Yes |
functionVersion | The function version that the alias invokes. | Yes |
aliasName | The name of the alias. | Yes |
aliasAdditionalVersionWeights | The name of second alias, and the percentage of traffic that's routed to it. | Yes |
Sample configuration
<amazonlambda.createAlias>
<functionName>{$ctx:functionName}</functionName>
<createAliasDescription>{$ctx:createAliasDescription}</createAliasDescription>
<functionVersion>{$ctx:functionVersion}</functionVersion>
<aliasName>{$ctx:aliasName}</aliasName>
<aliasAdditionalVersionWeights>{$ctx:aliasAdditionalVersionWeights}</aliasAdditionalVersionWeights>
<apiVersionCreateAlias>{$ctx:apiVersionCreateAlias}</apiVersionCreateAlias>
</amazonlambda.createAlias>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-2",
"blocking":"false",
"functionName":"test",
"functionVersion":"$LATEST",
"aliasName":"alias2",
"apiVersionCreateAlias":"2015-03-31"
}
Sample response
{
"AliasArn": "arn:aws:lambda:us-east-2:********:function:test:alias2",
"Description": "",
"FunctionVersion": "$LATEST",
"Name": "alias2",
"RevisionId": "be8925ae-a634-4303-92e2-5364d0724406",
"RoutingConfig": null
}
deleteAlias
The deleteAlias implementation deletes a Lambda function alias. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionDeleteAlias | API version for DeleteAlias method. | Yes |
functionName | The name of the Lambda function that the alias invokes. | Yes |
aliasName | The name of the alias. | Yes |
Sample configuration
<amazonlambda.deleteAlias>
<functionName>{$ctx:functionName}</functionName>
<aliasName>{$ctx:aliasName}</aliasName>
<apiVersionDeleteAlias>{$ctx:apiVersionDeleteAlias}</apiVersionDeleteAlias>
</amazonlambda.deleteAlias>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-2",
"blocking":"false",
"functionName":"test",
"aliasName":"alias2",
"apiVersionDeleteAlias":"2015-03-31"
}
Sample response
Status: 204 No Content
getAlias
The getAlias implementation of the GET operation returns details about a Lambda function alias. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionGetAlias | API version for getAlias method. | Yes |
functionName | The name of the Lambda function that the alias invokes. | Yes |
aliasName | The name of the alias. | Yes |
Sample configuration
<amazonlambda.getAlias>
<functionName>{$ctx:functionName}</functionName>
<aliasName>{$ctx:aliasName}</aliasName>
<apiVersionGetAlias>{$ctx:apiVersionGetAlias}</apiVersionGetAlias>
</amazonlambda.getAlias>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-2",
"blocking":"false",
"functionName":"test",
"aliasName":"alias2",
"apiVersionGetAlias":"2015-03-31"
}
Sample response
Status: 204 No Content
{
"AliasArn": "arn:aws:lambda:us-east-2:********:function:test:alias2",
"Description": "",
"FunctionVersion": "$LATEST",
"Name": "alias2",
"RevisionId": "be8925ae-a634-4303-92e2-5364d0724406",
"RoutingConfig": null
}
updateAlias
The updateAlias method implementation updates the configuration of a Lambda function alias. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionUpdateAlias | API version for updateAlias method. | Yes |
functionName | The name of the Lambda function that the alias invokes. | Yes |
aliasName | The name of the alias. | Yes |
updatedAliasDescription | The description of the alias. | Yes |
updatedAliasAdditionalVersionWeight | The name of second alias, and the percentage of traffic that's routed to it. | Yes |
functionVersion | The function version that the alias invokes. | Yes |
Sample configuration
<amazonlambda.updateAlias>
<functionName>{$ctx:functionName}</functionName>
<updatedAliasDescription>{$ctx:updatedAliasDescription}</updatedAliasDescription>
<functionVersion>{$ctx:functionVersion}</functionVersion>
<aliasName>{$ctx:aliasName}</aliasName>
<updatedAliasAdditionalVersionWeight>{$ctx:updatedAliasAdditionalVersionWeight}</updatedAliasAdditionalVersionWeight>
<apiVersionUpdateAlias>{$ctx:apiVersionUpdateAlias}</apiVersionUpdateAlias>
</amazonlambda.updateAlias>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-1",
"blocking":"false",
"functionName":"test",
"aliasName":"alias2",
"functionVersion":"$LATEST",
"apiVersionUpdateAlias":"2015-03-31"
}
Sample response
Status: 200 OK
{
"AliasArn": "arn:aws:lambda:us-east-2:*********:function:test:alias2",
"Description": "",
"FunctionVersion": "$LATEST",
"Name": "alias2",
"RevisionId": "6d8d089b-c632-4a4b-91ba-ee1ce706c50a",
"RoutingConfig": null
}
functions¶
addPermission
The addPermission method implementation grants an AWS service or another account permission to use a function. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionAddPermission | API version for AddPermission method. | Yes |
functionName | Name of the Lambda function, version, or alias. | Yes |
permissionAction | The action that the principal can use on the function.For example, lambda:InvokeFunction or lambda:GetFunction. | Yes |
permissionStatementId | A statement identifier that differentiates the statement from others in the same policy. | Yes |
permissionPrincipal | The AWS service or account that invokes the function. If you specify a service, use SourceArn or SourceAccount to limit who can invoke the function through that service. | Yes |
permissionQualifier | Specify a version or alias. | Yes |
Sample configuration
<amazonlambda.addPermission>
<functionName>{$ctx:functionName}</functionName>
<permissionAction>{$ctx:permissionAction}</permissionAction>
<permissionStatementId>{$ctx:permissionStatementId}</permissionStatementId>
<permissionPrincipal>{$ctx:permissionPrincipal}</permissionPrincipal>
<permissionQualifier>{$ctx:permissionQualifier}</permissionQualifier>
<apiVersionAddPermission>{$ctx:apiVersionAddPermission}</apiVersionAddPermission>
</amazonlambda.addPermission>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M55z8I*****************",
"accessKeyId":"AKIAJHJX************",
"region":"us-east-2",
"blocking":"false",
"functionName":"testFunction",
"permissionAction":"lambda:addPermission",
"permissionPrincipal":"s3.amazonaws.com",
"permissionStatementId":"Permisssion_Added182p",
"apiVersionAddPermission":"2015-03-31"
}
Sample response
Status: 201 Created
createFunction
The createFunction method implementation creates a new function. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionCreateFunction | The API version for the CreateFunction method. | Yes |
functionName | The name of the Lambda function. | Yes |
functionDescription | Contains description of the function. | Yes |
s3Bucket | An Amazon S3 bucket name in the same region as your function. | Yes |
s3Key | The Amazon S3 key of the deployment package. | Yes |
s3ObjectVersion | For versioned objects, the version of the deployment package object to use. | Yes |
zipFile | The base64-encoded contents of zip file containing your deployment package. AWS SDK and AWS CLI clients handle the encoding for you. | Yes |
targetArn | The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic. | Yes |
environmentVariables | Environment variable key-value pairs. | Yes |
kmsKeyArn | The ARN of the KMS key used to encrypt your function's environment variables. If not provided, AWS Lambda will use a default service key. | Yes |
layers | A list of function layers to add to the function's execution environment. | Yes |
memorySize | The amount of memory that your function has access to. Increasing the function's memory also increases it's CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB. | Yes |
publish | Set to true to publish the first version of the function during creation. | Yes |
role | The Amazon Resource Name (ARN) of the function’s execution role. | Yes |
runtime | The runtime version for the function.Valid Values: nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | java8 | python2.7 | python3.6 | python3.7 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | nodejs4.3-edge | go1.x | ruby2.5 |. | Yes |
tags | The list of tags (key-value-pairs) assigned to the new function. For more information see Tagging Lambda Functions in the AWS Lambda Developer Guide. | Yes |
timeout | The amount of time that Lambda allows a function to run before terminating it. The default is 3 seconds. The maximum allowed value is 900 seconds. | Yes |
mode | Set Mode to Activate to sample and trace a subset of incoming requests with AWS X-Ray. The tracing mode to Activate to sample and trace a subset of incoming requests with AWS X-Ray. | Yes |
securityGroupIds | A list of VPC security groups IDs. | Yes |
subnetIds | A list of VPC subnet IDs. | Yes |
Sample configuration
<amazonlambda.addPermission>
<functionName>{$ctx:functionName}</functionName>
<permissionAction>{$ctx:permissionAction}</permissionAction>
<permissionStatementId>{$ctx:permissionStatementId}</permissionStatementId>
<permissionPrincipal>{$ctx:permissionPrincipal}</permissionPrincipal>
<permissionQualifier>{$ctx:permissionQualifier}</permissionQualifier>
<apiVersionAddPermission>{$ctx:apiVersionAddPermission}</apiVersionAddPermission>
</amazonlambda.addPermission>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M55z8I*****************",
"accessKeyId":"AKIAJHJX************",
"region":"us-east-2",
"blocking":"false",
"s3Bucket":"ajbuck8",
"s3Key":"fnc.zip",
"s3ObjectVersion":"null",
"functionName":"createdFunc",
"handler":"mdhandler",
"role":"arn:aws:iam::14*****:role/service-role/yfuj",
"runtime":"python3.7",
"apiVersionCreateFunction":"2015-03-31"
}
Sample response
deleteFunction
The deleteFunction method implementation deletes a Lambda function. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionDeleteFunction | API version for DeleteFunction method. | Yes |
functionName | The name of the Lambda function. | Yes |
deleteFunctionQualifier | Specify a version to delete. You can't delete a version that's referenced by an alias. | Yes |
Sample configuration
<amazonlambda.deleteFunction>
<functionName>{$ctx:functionName}</functionName>
<deleteFunctionQualifier>{$ctx:deleteFunctionQualifier}</deleteFunctionQualifier>
<apiVersionDeleteFunction>{$ctx:apiVersionDeleteFunction}</apiVersionDeleteFunction>
</amazonlambda.deleteFunction>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJX************",
"region":"us-east-1",
"blocking":"false",
"functionName":"func",
"apiVersionDeleteFunction":"2015-03-31"
}
Sample response
getFunction
The getFunction method implementation returns information about the function or function version. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionGetFunction | API version for GetFunction method. | Yes |
functionName | The name of the Lambda function. | Yes |
qualifier | Specify a version or alias. | Yes |
Sample configuration
<amazonlambda.getFunction>
<functionName>{$ctx:functionName}</functionName>
<qualifier>{$ctx:qualifier}</qualifier>
<apiVersionGetFunction>{$ctx:apiVersionGetFunction}</apiVersionGetFunction>
</amazonlambda.getFunction>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-2",
"blocking":"false",
"functionName":"Fn",
"qualifier":"$LATEST",
"apiVersionGetFunction":"2015-03-31"
}
Sample response
getFunctionConfiguration
The getFunctionConfiguration method implementation returns the version-specific settings of a Lambda function or version. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionGetFunctionConfiguration | API version for GetFunctionConfiguration method. | Yes |
functionName | The name of the Lambda function. | Yes |
qualifier | Specify a version or alias. | Yes |
Sample configuration
<amazonlambda.getFunctionConfiguration>
<functionName>{$ctx:functionName}</functionName>
<qualifier>{$ctx:qualifier}</qualifier>
<apiVersionGetFunctionConfiguration>{$ctx:apiVersionGetFunctionConfiguration}</apiVersionGetFunctionConfiguration>
</amazonlambda.getFunctionConfiguration>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-2",
"blocking":"false",
"functionName":"test",
"qualifier":"$LATEST",
"apiVersionGetFunctionConfiguration":"2015-03-31"
}
Sample response
Status: 200 OK
invoke
The invoke method implementation invokes a Lambda function. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionInvoke | API version for Invoke method. | Yes |
functionName | The name of the Lambda function. | Yes |
qualifier | Specify a version or alias. | Yes |
x-amz-invocation-type | It specifies the way you want to invoke the function. Choose from the following options. | Yes |
x-amz-log-type | It specifies whether to include the execution log in the response. Set to Tail to include it in the response. Valid values are: None and Tail. | Yes |
x-amz-client-context | It's the base64-encoded data about the invoking client to pass to the function in the context object. It can be up to 3583 bytes.
|
Yes |
payload | The JSON that you want to provide to your Lambda function as input. | Yes |
Sample configuration
<amazonlambda.invoke>
<functionName>{$ctx:functionName}</functionName>
<apiVersionInvoke>{$ctx:apiVersionInvoke}</apiVersionInvoke>
<qualifier>{$ctx:qualifier}</qualifier>
<x-amz-invocation-type>{$ctx:x-amz-invocation-type}</x-amz-invocation-type>
<x-amz-log-type>{$ctx:x-amz-log-type}</x-amz-log-type>
<x-amz-client-context>{$ctx:x-amz-client-context}</x-amz-client-context>
<payload>{$ctx:payload}</payload>
</amazonlambda.invoke>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7m****************",
"accessKeyId":"AKIAJHJXWUY*********",
"region":"us-east-1",
"blocking":"false",
"functionName":"LambdawithLayer",
"apiVersionInvoke":"2015-03-31"
}
Sample response
Status: 200 OK
listFunctions
The listFunctions method implementation returns a list of Lambda functions, with the version-specific configuration of each. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionListFunction | API version for ListFunctions method. | Yes |
functionVersion | Version name which specifies the version to include in entries for each function. Set to ALL to include entries for all published versions of each function. | Yes |
marker | It specifies the pagination token that is returned by a previous request to retrieve the next page of results. | Yes |
masterRegion | For Lambda@Edge functions, the AWS Region of the master function. For example, us-east-2 or ALL. If specified, you must set FunctionVersion to ALL. | Yes |
maxItems | It specifies the value, ranging from 1 to 10000, to limit the number of functions in the response. | Yes |
Sample configuration
<amazonlambda.listFunctions>
<functionVersion>{$ctx:functionVersion}</functionVersion>
<apiVersionListFunctions>{$ctx:apiVersionListFunctions}</apiVersionListFunctions>
<marker>{$ctx:marker}</marker>
<masterRegion>{$ctx:masterRegion}</masterRegion>
<maxItems>{$ctx:maxItems}</maxItems>
</amazonlambda.listFunctions>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-1",
"blocking":"false",
"functionVersion":"ALL",
"marker":"1",
"masterRegion":"us-east-1",
"maxItems":"3",
"apiVersionListFunctions":"2015-03-31"
}
removePermission
The removePermission method implementation revokes function-use permission from an AWS service or another account. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionRemovePermission | API version for RemovePermission method. | Yes |
functionName | Name of the Lambda function. | Yes |
permissionStatementId | Statement ID of the permission to remove. | Yes |
permissionQualifier | It specifies a version or alias to remove permission from a published version of the function. | Yes |
permissionRevisionId | It's a Id which allow to update the policy only if the revision ID matches the ID that's specified. Use this option to avoid modifying a policy that has changed since you last read it. | Yes |
Sample configuration
<amazonlambda.removePermission>
<functionName>{$ctx:functionName}</functionName>
<apiVersionRemovePermission>{$ctx:apiVersionRemovePermission}</apiVersionRemovePermission>
<permissionStatementId>{$ctx:permissionStatementId}</permissionStatementId>
<permissionQualifier>{$ctx:permissionQualifier}</permissionQualifier>
<permissionRevisionId>{$ctx:permissionRevisionId}</permissionRevisionId>
</amazonlambda.removePermission>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-1",
"blocking":"false",
"functionName":"Fn",
"permissionStatementId":"Permisssion_Added1443p",
"apiVersionRemovePermission":"2015-03-31"
}
Sample response
Status: 204 No Content
Layers¶
addLayerVersionPermission
The addLayerVersionPermission method implementation adds permission to the resource-based policy of a version of an AWS Lambda layer. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionAddLayerVersionPermission | API version for AddLayerVersionPermission method. | Yes |
layerName | The name or Amazon Resource Name (ARN) of the layer. | Yes |
layerVersionNumber | The version number. | Yes |
layerRevisionId | Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it. | Yes |
layerAction | The API action that grants access to the layer. For example, lambda:GetLayerVersion. | Yes |
layerOrganizationId | With the principal set to *, grant permission to all accounts in the specified organization. | Yes |
layerPrincipal | An account ID, or * to grant permission to all AWS accounts. | Yes |
layerStatementId | An identifier that distinguishes the policy from others on the same layer version. | Yes |
Sample configuration
<amazonlambda.addLayerVersionPermission>
<layerName>{$ctx:layerName}</layerName>
<layerVersionNumber>{$ctx:layerVersionNumber}</layerVersionNumber>
<layerRevisionId>{$ctx:layerRevisionId}</layerRevisionId>
<layerAction>{$ctx:layerAction}</layerAction>
<layerOrganizationId>{$ctx:layerOrganizationId}</layerOrganizationId>
<layerPrincipal>{$ctx:layerPrincipal}</layerPrincipal>
<layerStatementId>{$ctx:layerStatementId}</layerStatementId>
<apiVersionAddLayerVersionPermission>{$ctx:apiVersionAddLayerVersionPermission}</apiVersionAddLayerVersionPermission>
</amazonlambda.addLayerVersionPermission>
Sample request
{
"secretAccessKey":"0b+fcboKq87Nf7mH6M**********************",
"accessKeyId":"AKIAJHJ*************",
"region":"us-east-2",
"blocking":"false",
"layerVersionNumber":"1",
"layerPrincipal":"*",
"layerStatementId":"Permisssion_Added",
"layerAction":"lambda:GetLayerVersion",
"layerName":"CustomFunction",
"apiVersionAddLayerVersionPermission":"2018-10-31"
}
Sample response
removeLayerVersionPermission
The removeLayerVersionPermission method implementation revokes permission to the resource-based policy of a version of an AWS Lambda layer. See the related API documentation.
Parameter Name | Description | Required |
---|---|---|
apiVersionRemoveLayerVersionPermission | API version for RemoveLayerVersionPermission method. | Yes |
layerName | The name or Amazon Resource Name (ARN) of the layer. | Yes |
layerVersionNumber | The version number of layer. | Yes |
layerRevisionId | Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it. | Yes |
layerStatementId | An identifier that distinguishes the policy from others on the same layer version. | Yes |
Sample configuration
<amazonlambda.removeLayerVersionPermission>
<layerName>{$ctx:layerName}</layerName>
<layerVersionNumber>{$ctx:layerVersionNumber}</layerVersionNumber>
<layerStatementId>{$ctx:layerStatementId}</layerStatementId>
<layerRevisionId>{$ctx:layerRevisionId}</layerRevisionId>
<apiVersionRemoveLayerVersionPermission>{$ctx:apiVersionRemoveLayerVersionPermission}</apiVersionRemoveLayerVersionPermission>
</amazonlambda.removeLayerVersionPermission>
Sample request
{
"secretAccessKey":"ZvLiOJbh/Gm5o/wE9l7+kAVtjDRg414a/Ev8sF0M",
"accessKeyId":"AKIAIZCDHDKX7DBMEKSA",
"region":"us-east-2",
"blocking":"false",
"layerVersionNumber":"1",
"layerStatementId":"Layer_Version_Permisssion_Added",
"layerName":"CustomFunction",
"apiVersionRemoveLayerVersionPermission":"2018-10-31"
}
Sample response
Status: 204 No Content