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
Click on “Create function”, select “author from scratch”, give it a name, select the runtime and click “Create function” at the bottom
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.
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.
Basic Settings is the section to configure the memory, timeout, and the IAM role.
The maximum timeout for a Lambda is 15 minutes.
3. Lambda Test
After uploading a zip file and clicking on “test” button, the log output will be displayed as follow
4. Lambda Triggers
You can select to trigger lambda from different AWS services.
Iron.io Serverless Tools
Speak to us to learn how IronWorker and IronMQ are essential products for your application to become cloud elastic.
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
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/
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
“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)”
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.