AWS Lambda Functions Task Documentation
With the addition of Create AWS Lambda Function in Tasks , users will be able to create templates of AWS Lambda Functions through Opsera Tasks and deploy them live via the Opsera Pipeline.
AWS Lambda Service workflow requires setup in both Tasks and Pipeline. The workflow is separated into two parts where the user enters certain static information in the Tasks page and then links the task to the respective step in the pipeline.
Task Setup Instructions:
To create an AWS Lambda Function Task template, navigate to Tasks and select + New Task button. In the Type drop down, click on AWS Lambda Function Creation.
Â
2. Fill in the field values required for task template creation:
AWS Tool - Select an AWS Tool.
Function Name - Create a unique name for the function. To confirm that the name is unique and does not exist in AWS yet, click the Validate button. If it already exists user will receive error:
Handler - Follow the example syntax to create. (Example for Java 8: example.Hello::handleRequest)
IAM Role - Fetched from AWS
Runtime - Select the language to write the function. Java 8 is supported at this time.
3. Select the Save button to save the task template.
Once the templates are created the user can create and deploy the functions via the opsera pipeline.
Pipeline Setup Instructions:
Note: To set up a Lambda pipeline, there are 3 steps required in the workflow:
Maven Build - Uses Jenkins Tool.
S3 Push - Uses Publish to S3 Tool.
Publish AWS Lambda - Uses Publish AWS Lambda Tool.
After configuring the first two steps (Maven Build and S3 Push) the user can move on to configuring the AWS Lambda step.
Select the gear icon in the Publish AWS Lambda step to open Step Configurations.
2. Select the proper values fields and Save:
Action - Select Create from the drop down to trigger function creation.
AWS Tool - Select the AWS Tool that matches the tool used in template creation in Tasks.
Lambda Function ↔︎ S3 Push Mapping - Select the Lambda function templates and map it to the respective s3 step(s).
Select Lambda Function - Select the Lambda function templates created in Tasks.
Select S3 Push Step - Select the S3 Push Step to map the function to. If the user has multiple s3 steps in the pipeline the user can map individual functions to different s3 steps thereby giving them the ability to create multiple functions as part of one pipeline step.
Pipeline Logs
As the pipeline runs the user will get logs regarding the success for failure of each function that the user is trying to create. To view them, navigate to the Summary tab and view Pipeline Logs table. Logs will generate a message per each function that has been created
Frequently Asked Questions
 | Question | Answer |
---|---|---|
1 | What are the possibilities that the handler of a given lambda function will get updated ? |
Note: Handler is nothing but a function or a method with complete path for a runtime ( eg: java) |
2 | How many handlers can be mapped to one function ? | One function will always map to one handler [ 1-1 mapping] |
3 | How many lambda functions can be created from one source ( eg: jar file) ? | Can create as many number of the functions , all functions will be pointed to the same source. |
4 | How does the data Flow ? |
|
Â
Â
Â
Â
         Â
Â