IronWorker CaaS Worker: AWS Lambda Setup

In this article, we will tell you the steps you need to set up AWS Lambda for IronWorker.

Achieve Cloud Elasticity with Iron

Speak to us to find how you can achieve cloud elasticity with a serverless messaging queue and background task solution with free handheld support.

1. Create Lambda

From the top services search input find “Lambda” and click on it

lambda_1

Click on “Create function”, select “author from scratch”, give it a name, select the runtime and click “Create function” at the bottom

lambda_2
lambda_3

2. Lambda Settings

Once your function is created it will redirect to the function settings page. Here you can set function triggers, run a test, or go to CloudWatch monitoring.

lambda_4

In the next section “Fucntion Code” we will upload our code as a zip file, you may use the inline editor as well.

In the Runtime Settings section make sure the Handler is configured properly as in your code module exports and prefixed with the file name.

Click on the action at the top right corner then select “Upload a .zip file” to select from your local machine.

The environment variables section is where we define the function used env vars.

lambda_5
lambda_6

Basic Settings is the section to configure the memory, timeout, and the IAM role.

The maximum timeout for a Lambda is 15 minutes.

lambda_7
lambda_8
lambda_9
lambda_10

3. Lambda Test

After uploading a zip file and clicking on “test” button, the log output will be displayed as follow

lambda_11

4. Lambda Triggers

You can select to trigger lambda from different AWS services.

lambda_12

Iron.io Serverless Tools

Speak to us to learn how IronWorker and IronMQ are essential products for your application to become cloud elastic.

5. Limits

Lambda function limits are on execution timeout, memory, files storage size, and concurrent execution

Function ​timeout​: 15 min
Function ​memory allocation​: 128MB - 10240 MB Function and layer storage (.zip file archives): 75GB Concurrent executions: 1000

6. Costs

AWS charges for Lambda per the number of requests and Duration the function runs depending on the amount of memory allocated to the function.

AWS Lambda pricing: ​https://aws.amazon.com/lambda/pricing/

7. Notes

Lambda is the core AWS serverless building block, it’s very easy to use and quick to setup, requires few steps to deploy a serverless function.

Limited timeout to 15 min may make it don’t fit with many applications or require additional components to serve the task

8. Security

“As of March 2019, Lambda is compliant with SOC 1, SOC 2, SOC 3, PCI DSS, U.S. Health Insurance Portability and Accountability Act (HIPAA)”

Source:​https://docs.aws.amazon.com/whitepapers/latest/security-overview-aws-lambda/lambda-and-compliance.html

9. Pros & CONS

Pros are running code snippet in an isolated runtime environment and the very easy steps to upload your function to Lambda. It can be uploaded as a zip package or entered through the web console. Short timeout and predefined runtimes are the main cons with AWS Lambda.

Unlock the Cloud with Iron.io

Find out how IronWorker and IronMQ can help your application obtain the cloud with fanatical customer support, reliable performance, and competitive pricing.

Leave a Comment





This site uses Akismet to reduce spam. Learn how your comment data is processed.