AWS Lambda Component
List and invoke AWS Lambda functions
Component key: aws-lambda
Description
AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. The AWS Lambda component allows you to manage and interact with AWS Lambda functions.
API Documentation: AWS Lambda Documentation
Connections
AWS Lambda Access Key and Secret
An AWS IAM access key pair is required to interact with AWS Lambda. Make sure that the key pair you generate in AWS has proper permissions to the Lambda functions you want to access. Read more about AWS Lambda permissions in the AWS docs.
Input | Notes | Example |
---|---|---|
Access Key ID string / Required accessKeyId | An AWS IAM Access Key ID | AKIAIOSFODNN7EXAMPLE |
Secret Access Key password / Required secretAccessKey | An AWS IAM Secret Access Key | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
AWS Role ARN
To enable the IAM role authentication begin by logging into the AWS Console and navigate to Identity and Access Management (IAM).
To create an ARN user and generate credentials:
- Navigate to Users and select Create User.
- Provide a User name and check the box providing them user access to the AWS Management Console if needed.
- Once completed with the User creation, copy the ARN provided in the summary for a later step.
- To obtain the ARN for an existing User, click on the designated username from the Users page and the ARN will be provided in the summary section.
- From the summary section, select Create access key
- Select Third-party service as the access key type and select next.
- Set a description and select create access key.
- Copy the Access Key and Secret access key and enter those into the connection configuration of your integration along with the ARN.
To create and assign a user a role:
- Navigate to Roles and select Create Role.
- Select Custom Trust Policy for the Trusted entity types
- Copy the following statement into the statement console. Making sure to replace the ARN with the user's actual ARN from the previous section
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "ARN"
},
"Action": "sts:AssumeRole"
}
]
}
- When adding permissions provide the AWSLambda_FullAccess permission
- Complete remaining steps and select Create Role
Input | Notes | Example |
---|---|---|
Access Key ID string / Required accessKeyId | An AWS IAM Access Key ID | AKIAIOSFODNN7EXAMPLE |
Role ARN string / Required roleARN | An AWS IAM Role ARN | arn:aws:iam::OtherAccount-ID:role/assumed-role-name |
Secret Access Key password / Required secretAccessKey | An AWS IAM Secret Access Key | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
Actions
Invoke
Invoke an AWS Lambda function | key: invoke
Input | Default | Notes | Example |
---|---|---|---|
AWS Region string awsRegion | AWS provides services in multiple regions, like us-west-2 or eu-west-1. | us-east-1 | |
Connection connection connectionInput | |||
Dynamic Access Key ID string dynamicAccessKeyId | Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID. | ||
Dynamic Secret Access Key password dynamicSecretAccessKey | Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key. | ||
Dynamic Session Token password dynamicSessionToken | Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token. | ||
Function Name or ARN string / Required functionName | This can be a function name (my-function), name with alias (my-function:v1), or function ARN (arn:aws:lambda:us-west-2:123456789012:function:my-function). | my-function | |
Payload string invokeArgs | The payload to send the lambda function. This can be a JSON string or object that can be serialized into JSON. | {"firstKey":"firstValue","secondKey":"secondValue"} | |
Invoke Type string / Required invokeType | RequestResponse | RequestResponse (default) - Invoke the function synchronously. Event - Invoke the function asynchronously. DryRun - Validate parameter values and verify that the user or role has permission to invoke the function. |
List Function
List Information and metadata about all AWS Lambda functions | key: listFunctions
Input | Notes | Example |
---|---|---|
Connection connection awsConnection | ||
AWS Region string awsRegion | AWS provides services in multiple regions, like us-west-2 or eu-west-1. | us-east-1 |
Dynamic Access Key ID string dynamicAccessKeyId | Use this input to authenticate with AWS if you are using a dynamically-generated access key. Otherwise, use the connection to enter a static access key ID. | |
Dynamic Secret Access Key password dynamicSecretAccessKey | Use this input to authenticate with AWS if you are using a dynamically-generated secret access key. Otherwise, use the connection to enter a static secret access key. | |
Dynamic Session Token password dynamicSessionToken | Use this input to authenticate with AWS if you are using a OPTIONAL dynamically-generated session token. | |
Marker string marker | Specify the pagination token that's returned by a previous request to retrieve the next page of results | lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E |
Max Items string maxItems | Provide an integer value for the maximum amount of items that will be returned. Provide a value from 1 to 50. | 20 |