aws.lambda
Module aws.lambda
API
ballerinax/aws.lambda Ballerina library
Package Overview
This module provides the capabilities of creating AWS Lambda functions using Ballerina.
- For information on the operations, which you can perform with this module, see Classes.
- For information on the deployment, see the AWS Lambda Deployment Guide.
Report Issues
To report bugs, request new features, start new discussions, view project boards, etc., go to the Ballerina AWS Lambda repository.
Useful Links
- Discuss code changes of the Ballerina project in ballerina-dev@googlegroups.com.
- Chat live with us via our Discord server.
- Post all technical questions on Stack Overflow with the #ballerina tag.
Functions
__process
function __process()
Process and excute the handler.
__register
function __register(string handler, FunctionType func, typedesc<anydata> eventType)
Register a function handler with the function and event type.
Parameters
- handler string - Function Hanlder name
- func FunctionType - Function type
- eventType typedesc<anydata> - Event type
Classes
aws.lambda: Context
Object to represent an AWS Lambda function execution context.
getRequestId
function getRequestId() returns string
Returns the unique id for this request.
Return Type
- string - the request id
getDeadlineMs
function getDeadlineMs() returns int
Returns the request execution deadline in milliseconds from the epoch.
Return Type
- int - the request execution deadline
getInvokedFunctionArn
function getInvokedFunctionArn() returns string
Returns the ARN of the function being invoked.
Return Type
- string - the invoked function ARN
getTraceId
function getTraceId() returns string
Returns the trace id for this request
Return Type
- string - the trace id
getRemainingExecutionTime
function getRemainingExecutionTime() returns int
Returns the remaining execution time for this request in milliseconds
Return Type
- int - the remaining execution time
Annotations
aws.lambda: Function
The annotation, which is used to mark the function as an AWS Lambda function.
Records
aws.lambda: APIGatewayProxyRequest
Represents the AWS API Gateway proxy request details received from AWS when the gateway is triggered.
Fields
- 'resource string -
- path string - the URL path of the caller
- httpMethod string - HTTP method of the request
- body string? - body of the request
- isBase64Encoded boolean - field to identify if the content is Base64 encoded
aws.lambda: DynamoDBEvent
Represents the DynamoDB event details received from AWS when the DynamoDB notification is triggered.
Fields
- Records DynamoDBRecord[] - record list of the DynamoDB notifications
aws.lambda: DynamoDBRecord
Represents the DynamoDB related details.
Fields
- eventID string - a globally unique identifier for the event that was recorded in this stream record
- eventVersion string - the version number of the stream record format
- dynamodb DynamoDBStreamRecord - the main body of the stream record containing all of the DynamoDB-specific fields
- awsRegion string - AWS region to which the DynamoDB belongs
- eventName string - the type of data modification that was performed on the DynamoDB table
- eventSourceARN string - the event source arn of then DynamoDB
- eventSource string - the AWS service from which the stream record originated
aws.lambda: DynamoDBStreamRecord
Represents the details of the stream related to the DynamoDB.
Fields
- Keys map<json> - the primary key attribute(s) of the DynamoDB item that were modified
- NewImage? map<json> - the item in the DynamoDB table after it is modified
- OldImage? map<json> - the item in the DynamoDB table before it was modified
- StreamViewType string - the type of data of the modified DynamoDB item that was captured in this stream record
- SequenceNumber string - the sequence number of the stream record
- SizeBytes int - the size of the stream record (in bytes)
aws.lambda: NameValue
Represents the details of the name related to the simple email service.
Fields
- name string - name of the header
- value string - value of the header
aws.lambda: S3Bucket
Represents the details of the bucket related to the S3 service.
Fields
- name string - S3 bucket name
- ownerIdentity S3Identity - S3 bucket owners identity
- arn string - S3 bucket arn
aws.lambda: S3Element
Represents the details of the element related to the S3 service.
Fields
- s3SchemaVersion string - Version of the S3 schema
- configurationId string - Configuration ID
- bucket S3Bucket - S3 bucket related details
- 'object S3Object -
aws.lambda: S3Event
Represents the S3 event details received from AWS when the S3 notification is triggered.
Fields
- Records S3Record[] - A list of S3 event notification records
aws.lambda: S3Identity
Represents the details of the identity related to the S3 service.
Fields
- principalId string - S3 principal ID
aws.lambda: S3Object
Represents the details of the object related to the S3 service.
Fields
- key string - Object key
- size int - Object size
- eTag string - Object tag
- sequencer string - Object sequencer
aws.lambda: S3Record
Represents the S3 bucket notification related details.
Fields
- eventVersion string - version of the event
- eventSource string - the source of the triggered event
- awsRegion string - the AWS region to which the S3 bucket belongs
- eventTime string - invoked time of the event
- eventName string - name of the invoked event
- userIdentity S3Identity - identity of the user who invoked the event
- s3 S3Element - S3 element related details
aws.lambda: SESAction
Represents the details of the action related to the simple email service.
Fields
- 'type string -
- invocationType string - invocation type of the email service
- functionArn string - arn of the function that is executed
aws.lambda: SESCommonHeaders
Represents the simple email service related details.
Fields
- 'from string[] -
- to string[] - the receiver address of the email
- returnPath string - return path of the email
- messageId string - the unique ID assigned to the email by Amazon SES
- date string - the day on which the email was sent
- subject string - subject of the email
aws.lambda: SESElement
Represents the details of the element related to the simple email service.
Fields
- mail SESMail - email-related details of the event
- receipt SESReceipt - receipt-related details of the event
aws.lambda: SESEvent
Represents the simple email service event details received from AWS when the SES notification is triggered.
Fields
- Records SESRecord[] - record list of the SES notifications
aws.lambda: SESMail
Represents the details of the email related to the simple email service.
Fields
- commonHeaders SESCommonHeaders - list of headers common to all emails
- 'source string -
- timestamp string - string that specifies the date and time at which the action was triggered (in the ISO 8601 format)
- destination string[] - a complete list of all recipient addresses
- headers NameValue[] - parameter description
- headersTruncated boolean - specifies whether the headers were truncated in the notification
- messageId string - the unique ID assigned to the email by Amazon SES
aws.lambda: SESReceipt
Represents the details of the receipt related to the simple email service.
Fields
- recipients string[] - a list of recipients that were matched by the active receipt rule
- timestamp string - string that specifies the date and time at which the action was triggered (in the ISO 8601 format)
- spamVerdict SESVerdict - object that indicates whether the message is spam
- dkimVerdict SESVerdict - object that indicates whether the DomainKeys Identified Mail (DKIM) check passed
- processingTimeMillis int - processing time taken for the email (in milliseconds)
- action SESAction - Object that encapsulates the information about the action that was executed
- spfVerdict SESVerdict - object that indicates whether the Sender Policy Framework (SPF) check passed
- virusVerdict SESVerdict - virus verdict status of the email
aws.lambda: SESRecord
Represents the details of the notification related to the simple email service.
Fields
- eventVersion string - the version number of the email format
- ses SESElement - details of the SES event
- eventSource string - the AWS service from which the email originated
aws.lambda: SESVerdict
Represents the details of the verdict related to the simple email service.
Fields
- status string - status of the verdict
aws.lambda: SQSEvent
Represents the AWS SQS event details received from AWS when the SQS notification is triggered.
Fields
- Records SQSRecord[] - list of SQS event notifications
aws.lambda: SQSRecord
Represents the Amazon simple queue service notification related details.
Fields
- messageId string - ID of the message
- receiptHandle string - receipt handle of the message
- body string - body of the notification
- md5OfBody string - md5 hash of the body
- eventSource string - source of the triggered event
- eventSourceARN string - arn of the event source
- awsRegion string - region of the SQS notification
Import
import ballerinax/aws.lambda;
Metadata
Released date: 2 days ago
Version: 3.3.0
License: Apache-2.0
Compatibility
Platform: java21
Ballerina version: 2201.11.0
GraalVM compatible: Yes
Pull count
Total: 27
Current verison: 0
Weekly downloads
Keywords
aws
lambda
serverless
cloud