Lambda updates

The base image for lambda containers is updated periodically. This requires the 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 lambda using update lambda API method but it 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, the 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 the lambdas built on the 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 backup directly from existing lambda.

Restoration from backup

In case the archive is not present in S3, you can use the 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 in 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 imported image is currently forbidden, but can become available in the future.