This guide walks through the full process of pushing an updated build of a SendSafely AWS Lambda Function (ie Dropzone connectors, Action Webhooks, etc). It covers three things that usually need to happen together when you ship a new version:
- Replacing the connector's or action's Lambda function code with a new ZIP that contains the updated code.
- Publishing a new Lambda layer version (for shared dependencies like the SendSafely SDK).
- Pointing your Lambda function at the new layer version and bumping the Node.js runtime.
The instructions below assume you have IAM permissions to update the Lambda function and publish layers. Only the Console steps are included if you plan to use CLI please refer to AWS documentation for help.
Before you begin
Make sure you have the following ready:
- The new connector or action ZIP file provided by SendSafely
- The new layer ZIP file (if applicable) provided by SendSafely
Important : Save the existing deployment package and configuration
Before you change anything, capture what's currently deployed so you can roll back cleanly if the new build misbehaves. This step takes about a minute and saves you a lot of pain if something goes wrong.
What you're capturing:
- The current function ZIP — Lambda doesn't keep your old code around once you upload a new package, so download it before you replace it.
Open the Lambda console and navigate to your function. On the right hand side of the screen at the top, click Download → Download function code .zip. Save the resulting ZIP somewhere safe and label it with the date and the function name (e.g.,
copy_to_workspace_function_code_PREV_20260506.zip).
- Scroll to the Runtime settings panel and note the current Runtime value (e.g.,
Node.js 22.x) and Architecture (e.g.,x86_64). - Scroll down to the Layers section. Note the full ARN of every layer attached, including the version number at the end. Save these somewhere you can find later.
Step 1: Update the connector function code
This replaces the deployment package on the existing Lambda. It does not change configuration, environment variables, or layers — only the code.
- Open the Lambda console and navigate to your function.
On the Code tab, click Upload from → .zip file.
- Select your new connector ZIP that was provided to you by SendSafely and click Save.
- Wait for the "Successfully updated the function" banner. The state in the top-right should briefly show Pending and then return to Active.
Step 2: Publish a new layer version
Lambda layers are immutable — you don't "edit" a layer, you publish a new version of it. The layer's ARN ends with :N where N is the version number, and that's what you'll point your function at in the next step.
In the Lambda console, go to Function resources → Layers.
- Click your connector's or action's existing layer (e.g.
sendsafely-dropzone-layer). Click Create version.
- Provide any helpful "Description".
- Select "Upload a .zip file".
- Upload the new layer zip file given to you by SendSafely. (e.g
sendsafely-dropzone-layer-20260504.zip). - Choose
x86_64as the Compatible architectures. - Under Compatible runtimes, select every runtime you might point at this layer — for example,
nodejs22.xandnodejs24.x. Selecting both lets you upgrade the function runtime without republishing the layer. At the time of publishing this article the latest node.js version was 24 so we suggest you use just the nodejs24.x as the compatible runtime. - Click Create.
- Copy the new layer ARN from the version detail page. It will look like:
arn:aws:lambda:us-east-1:123456789012:layer:sendsafely-dropzone-layer-20260504:7
Step 3: Point the function at the new layer and update the runtime
- Open the function in the Lambda console.
Scroll to the Layers section at the bottom of the Code tab.
Click Edit, then click Add a layer, choose Custom layers, pick the new version of the layer that you created on Step-2 (e. g
sendsafely-dropzone-layer-20260504.zip), and select the new version (e.g. version 7).- Click Save.
Now go to the Runtime settings panel (also on the Code tab, scroll up).
Click Edit, change Runtime to
Node.js 24.x(or your target), and click Save. Make sure the Architecture isx86_64.
Testing and/or Rollback if Needed
The final test is to perform basic smoke testing of the function (by submitting a package that triggers the Lambda). For a Dropzone connector this typically means triggering a test upload through the configured Dropzone, for Workflows this would mean triggering the workflow event.
If the function does not perform as expected, follow the instructions below to roll back the change. You should restore the previous Lambda version using the ZIP files and ARN obtained in the "Save the existing deployment package and configuration" step.
Lambda Code:
- Open the Lambda console and navigate to your function.
- On the Code tab, click Upload from → .zip file and select the previous function ZIP you saved (e.g.,
copy_to_workspace_function_code_PREV_20260506.zip). Wait for the "Successfully updated the function" banner.
Layer (if applicable):
- Scroll to the Layers section, click Edit, remove the new layer version, and re-add the previous layer ARN you noted (including the original
:Nversion number at the end). Click Save. - Scroll to Runtime settings, click Edit, and set the Runtime and Architecture back to the values you recorded before the upgrade (e.g., Node.js 22.x, x86_64). Click Save.
After the rollback. re-run your smoke test to confirm the function is back to its previous working state.
Comments
0 comments
Please sign in to leave a comment.