Lambda updates

The base image for lambda containers is updated periodically. This requires a lambda to be recreated so that its container can be rebuilt on the basis of the new image. After the base image and luna_lambda_tools are updated, the functionality of the lambda may be affected.

The backup is normally stored in S3.

Update mechanism

You can update a lambda using the update lambda API method but it is recommended the backup archive to be present in S3.

When the LAMBDA_BASE_IMAGE setting pins the base image matching the lambda’s base image name, the update rebuilds the lambda on the pinned image. Otherwise, lambdas built on the built-in lpa-lambda-base or lpa-lambda-base-fsdk images are updated to the current version of the base image, and lambdas built on other images keep the base image tag stored with the lambda.

Backup strategies

  • Do not delete the archive from S3: This is the primary backup storage.

  • Store locally: Use your personal storage.

  • Use Kubernetes directly: If the only available location to retrieve the lambda is directly from the Kubernetes cluster, you can ask the cluster admin to get the backup directly from the existing lambda.

Restoration from backup

In case the archive is not present in S3, you can use a backup file and use the put lambda API method. This is necessary as the Lambda service in this case does not have access to the original archive.

Remember, updates to the base image and luna_lambda_tools may disrupt the lambda functionality. Thus, as an optional but recommended step, perform a preliminary local run before updating.

Imported image

Image update for lambda created from an imported image is currently forbidden, but can become available in the future.