This document explains how to implement a GeneXus application as an AWS Lambda Functions.
Download and run the AWS CLI MSI installer.
- Create an AWS Account
- Create an IAM User with Access Keys
Follow the steps below:
- Create a Deployment Unit object and add the Procedure taking into account the following:
- Select Build > Deploy Application and a dialog box will open with a Target Combo Box for you to choose the following value: AWS Lambda Functions.
- Configure the properties by clicking on the Options link.
Note: In addition to configuring the AWS Profile name property, you need to consider the following:
- Click on the Deploy button to implement in AWS.
As shown in the image, you can make the necessary settings for a timer-triggered function.
In this example, the AWS Profile name property is not set, so the AWS Access Key ID and AWS Secret Access Key properties are set instead.
- Java Generator only (Highest JDK version supported: JDK11)
- Multimedia content considerations
- If using Image, Audio, Video, BlobFile data types => Storage Provider property must be used. This is because all App multimedia must be served from an external URL, such as Amazon S3.
- FileSystem cannot be used to serve content: File/read write access as Blob data type, Excel, PDF Reports.
- Temporal restrictions:
- WebSession data type not supported (coming later)
- KB Images not supported if returned from Server Side. For example: Procedure that Returns &Image.FromImage(MyKBImage).
- DBMS Connection Pooling does not work in Serverless.
- This is because Serverless executes one Lambda Function per Request. Therefore, every Lambda execution initializes a DB Pool. Thus, if 200 requests are received at the exact same time, 200 lambdas are woken up, and 200 connections to DB will be opened.
If the function app uses Image, Audio, Video, or BlobFile data types, you have to configure the Storage Provider property because all multimedia must be served from an external URL, such as Microsoft Azure or AWS S3.
For the same reason, using the file system to serve content is not supported; that is, to have read/write access to files (such as Blob data type, Excel, or PDF reports).
AWS Lambda functions are GeneXus applications that follow the structure required by the AWS Lambda Java engine.
An AWS Lambda GeneXus package looks as follows:
- “Lib” contains the required JAR files for the Application to run.
- “com” contains the Java .class files.
- Contains the Entry point that will be executed when the lambda is woken up by the runtime. **
**(This should be formatted as a CODE paragraph)
Also, note that depending on the “Trigger Type” Deployment Property, GeneXus will assign the AWS Lambda Handler property accordingly.
- For a SQS Triggered Function, the Lambda Handler name is: com.genexus.cloud.serverless.aws.handler.LambdaSQSHandler::handleRequest
- For a Timer Triggered Function, the Lambda Handler name is: com.genexus.cloud.serverless.aws.handler.LambdaEventBridgeHandler::handleRequest
- For an Event Bridge Triggered Function, the Lambda Handler name is: com.genexus.cloud.serverless.aws.handler.LambdaEventBridgeHandler::handleRequest
- For an HTTP Triggered Function, the Lambda Handler name is: com.genexus.cloud.serverless.aws.handler.LambdaHttpApiHandler::handleRequest
This handler will be set automatically by GeneXus. However, in case of manual deployment, you will need to set the “Handler” accordingly.
Since GeneXus 17 Upgrade 11.