CloudBees action: Invoke an AWS Lambda function

1 minute read

Use this action to invoke a function in the Amazon Web Services (AWS) Lambda serverless architecture. Run code in AWS Lambda without provisioning or managing servers.

Prerequisites

Make sure to initialize the connection using your AWS credentials, by adding the following to your YAML file:

- name: Configure AWS credentials uses: cloudbees-io/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.MY_KEY_ID }} aws-secret-access-key: ${{ secrets.MY_SECRET_KEY }} aws-region: eu-west-3

Refer to CloudBees action: Configure AWS credentials for more information.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 1. Input details
Input name Data type Required? Description

function-name

String

Yes

The AWS Lambda function name.

parameters

JSON

No

The input you want to provide to your Lambda function, formatted as JSON data in key/value pairs.

Usage example

In your YAML file, add:

- name: Invoke AWS lambda function id: invokeLambdaFunction uses: cloudbees-io/lambda-invoke-function@v1 with: function-name: my-function