AWS Lamda plugin

3 minute readExtensibilityDeveloper productivity

AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume.

With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.

Plugin Version 1.3.3.2020102201 Revised on December 19, 2018

Setting up the plugin configuration

Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They reduce repetition of common values, create predefined sets of parameters for end users, and store credentials securely. Each configuration has a unique name that is automatically entered in designated parameters in the procedures.

Input

  1. In the Main Menu, click Admin  Plugins to open the Plugin Manager.

  2. Find the EC-AWS-Lambda row.

  3. Click Configure to open the AWS Lambda Configurations page.

  4. Click Create Configuration. Enter the following information and click OK.

    Remember that you may need to create additional configurations later.

Parameter Description

Configuration Name

Name of the plugin configuration.

Description

Description for the plugin configuration.

AWS region

AWS region. For list of available regions visit AWS Regions page.

Credential

  • User Name: AWS API key.

  • Password: AWS API Secret.

  • Retype Password: Re-enter the AWS API Secret.

Output

The AWS Lambda Configurations page now shows the new configuration.

You can also manage your AWS Lambda configurations in this page. Click Edit to modify an existing configuration or Delete to remove an existing configuration.

Plugin procedures

CreateLambdaFunction

This procedure creates AWS Lambda function using AWS SDK.

Input

  1. In the Main Menu, click Admin  Plugins to open the Plugin Manager.

  2. Got to the EC-AWS-Lambda plugin.

  3. Go to the CreateLambdaFunction procedure.

  4. Enter the following parameters:

Parameter Description

Configuration name

Name of the configuration to be used. URL and credentials are retrieved from the given configuration. A Configuration defines connection details and can be created by going to plugin configuration page.

Function name

AWS Lambda function name to create. To get information about AWS Lambda function visit AWS Console.

Runtime name

Runtime name for the Lambda function. For example: "python2.7" without quotes.

Path to deployment package zip file

Zip file with lambda function code. Could be created manually or exported from AWS Lambda console.

Lambda handler

Handler that is being used for Lambda function invocation. For example, if your file is "lambda_file" and lambda function is "main", handler should be "lambda_file.main" without quotes.

AWS role

ARN of AWS role that should be used for AWS Lambda execution. This role should have sufficient permissions.

Output

After the job runs, you can view the results on the Job Details page in ElectricFlow.

In the CreateLambdaFunction step, click the Log button to see the diagnostic information.

RunLambdaFunction

This procedure runs AWS Lambda Function

Input

  1. In the Main Menu, click Admin  Plugins to open the Plugin Manager.

  2. Got to the EC-AWS-Lambda plugin.

  3. Go to the RunLambdaFunction procedure.

  4. Enter the RunLambdaFunction parameters:

Parameter Description

Configuration name

Name of the configuration to be used. URL and credentials are retrieved from the given configuration. A Configuration defines connection details and can be created by going to plugin configuration page.

Function name

AWS Lambda function name to invoke. To get information about AWS Lambda function visit AWS Console.

Function parameters

Parameters in JSON format to be passed to AWS Lambda function. These parameters will be available through event object.

Success criteria

Result that should be returned by lambda function to finish procedure with success status. If "Is regexp?" is checked, value of this field will be used as regexp.

Is regexp?

If checked, "Success criteria" field will be used as regexp.

Output

After the job runs, you can view the results on the Job Details page in ElectricFlow.

In the RunLambdaFunction step, click the Log button to see the diagnostic information.

Release notes

EC-AWS-Lambda 1.3.3

  • The documentation has been migrated to the main site.

EC-AWS-Lambda 1.3.2

  • The plugin icon has been updated.

EC-AWS-Lambda 1.3.1

  • Documentation has been updated.

  • Added more output.

  • Bug fixes.

EC-AWS-Lambda 1.3.0

  • "Is regexp?" and "Success criteria" parameters have been added to RunLambdaFunction procedure.

EC-AWS-Lambda 1.2.4

  • Request Payload coding has been changed to UTF-8 for RunLambdaFunction procedure.

EC-AWS-Lambda 1.2.3

  • Fixed an issue when it was impossible to load zip file from windows machines.

EC-AWS-Lambda 1.2.2

  • Missing documentation has been added.

EC-AWS-Lambda 1.2.1

  • Switched from DefaultClient to BuildClient for CreateLambdaFunction and RunLambdaFunction procedures.

EC-AWS-Lambda 1.2.0

  • Fixed and issue when AWS Client was not able to read configuration if default configuration exists.

EC-AWS-Lambda 1.1.0

  • RunLambdaFunction now supports additional parameters.

EC-AWS-Lambda 1.0.0

  • RunLambdaFunction procedure has been added.