Skip to content

Lambda

Bases: DuploTenantResourceV2

Manage Duplo Lambdas

Duplo Lambdas are serverless functions that run in response to events.

apply

Apply a service.

create

Create a new tenant.

CLI Usage

duploctl lambda create -f 'lambda.yaml'
Contents of the lambda.yaml file
FunctionName: duploctl-img
PackageType: Image
Description: My cool image lambda
Timeout: 2
MemorySize: 128
Tags: {}
Environment:
  Variables: {}
Code:
  ImageUri: 884446924812.dkr.ecr.us-east-2.amazonaws.com/numpy-lambda-container-automation:latest
Layers: []
ImageConfig: {}

Parameters:

Name Type Description Default
body BODY

The lambda body.

required
wait WAIT

Whether to wait for the tenant to be created

False

Returns:

Name Type Description
message dict

A success message.

delete

Delete a lambda.

CLI Usage
duploctl lambda delete <name>

Parameters:

Name Type Description Default
name NAME

The name of the lambda to delete.

required

Returns:

Name Type Description
message dict

A success message.

find

Find a Lambda function by name.

CLI Usage
duploctl lambda find <name>

Args: name: The name of the lambda to find. Returns: The lambda object. Raises: DuploError: If the lambda could not be found.

list

List Lambdas.

List all of the tenants in the current tenant.

CLI Usage
duploctl lambda list

Returns:

Name Type Description
list list

A list of all lambdas in the current subscription.

update_image

Update the image of a lambda.

CLI Usage
duploctl lambda update_image <name> <image>

Parameters:

Name Type Description Default
name NAME

The name of the lambda to update.

required
image IMAGE

The new image to use for the lambda.

required

Returns:

Name Type Description
message dict

The updated lambda object

update_s3

Update the s3 bucket and key of a lambda.

CLI Usage
duploctl lambda update_s3 <name> <bucket> <key>

Parameters:

Name Type Description Default
name NAME

The name of the lambda to update.

required
bucket S3BUCKET

The s3 bucket to use for the lambda.

required
key S3KEY

The s3 key (file path) to use for the lambda.

required