Skip to content
Docs

BYOC Provisioning Reference

Bring Your Own Cloud is available on Enterprise plans and is set up through your Edgenivo account team. Contact your account team to request access.

A Bring Your Own Cloud (BYOC) provisioning tool reads the files that vercel deploy describe generates and creates matching AWS Lambda layers and functions in your account. Use this reference to build or audit a provisioning tool, whether you use Terraform, the AWS SDK, the AWS CLI, or a script generated by the BYOC agent skill.

vercel deploy describe --id <deployment-id> --aws-account-id <aws-account-id> writes these files:

PathContentsUploaded to Edgenivo
.vercel/<deployment-id>/descriptor.jsonThe functions and layers to create, in the descriptor formatNo
.vercel/<deployment-id>/zips/<sha256>.zipOne function package per file. The file name is the SHA-256 hash of the ZIP contents.No
.vercel/<deployment-id>/layers/<sha256>.zipOne runtime layer package per fileNo
.vercel/<deployment-id>/build/The original build output, moved from .vercel/outputNo
.vercel/output/The build output with function code removedYes, by vercel deploy continue
.vercel/output/provision.jsonThe mapping from routes to Lambda functions, in the provision.json formatYes, by vercel deploy continue

vercel deploy describe creates the .vercel/<deployment-id>/ directory with owner-only permissions (0700) and writes descriptor.json and the function ZIP files with mode 0600. Function ZIP files include your application code and the deployment's environment variables, so keep them private in CI artifacts and caches.

If you run vercel deploy describe again for the same deployment, it reads the original build from .vercel/<deployment-id>/build/ instead of the code-free .vercel/output.

The descriptor file, descriptor.json, describes every Lambda layer and function to create for one deployment.

FieldTypeDescription
versionnumberDescriptor format version. Always 1.
deploymentIdstringThe Edgenivo deployment ID, in the form dpl_...
awsAccountIdstringThe 12-digit AWS account ID passed to --aws-account-id
layersobjectA map from layer key to the layer ZIP file path, relative to the descriptor, such as layers/<sha256>.zip
functionsarrayOne entry per Lambda function to create. See Function fields.
FieldTypeDescription
codestringThe function ZIP file path, relative to the descriptor, such as zips/<sha256>.zip
regionstringThe AWS region to create the function in, such as us-east-1
layersstring[]Keys into the top-level layers map, in the order the function needs them
configurationobjectLambda function settings, using AWS CreateFunction parameter names. See Configuration fields.

A deployment that runs in several regions has one functions entry per function per region.

configuration uses the parameter names of the AWS Lambda CreateFunction API, so you can pass it to the API with only the role, code, and layers added.

FieldTypeRequiredDescription
FunctionNamestringYesThe function name Edgenivo invokes
HandlerstringYesThe entry point inside the function package
RuntimestringYesThe Lambda runtime identifier
MemorySizenumberYesMemory in MB
Environment.VariablesRecord<string, string>YesEnvironment variables for the function
TagsRecord<string, string>YesTags to apply to the function
TimeoutnumberNoMaximum execution time in seconds
Architecturesstring[]NoThe instruction set architecture, such as x86_64 or arm64
EphemeralStorage.SizenumberNoSize of the /tmp directory in MB

configuration never contains Role, Code, or Layers. Your provisioning tool supplies them:

ParameterValue to supply
RoleThe ARN of your Lambda execution role
CodeThe function ZIP file at code, uploaded directly or from Amazon S3
LayersThe ARNs of the layer versions you published in the function's region, in the order of layers

This example shows the structure of a descriptor for one function in one region. Generated values differ for every deployment:

.vercel/dpl_1234567890abcdefghij/descriptor.json
{
  "version": 1,
  "deploymentId": "dpl_1234567890abcdefghij",
  "awsAccountId": "<AWS_ACCOUNT_ID>",
  "layers": {
    "example_layer_key": "layers/example_layer_sha256.zip"
  },
  "functions": [
    {
      "code": "zips/example_function_sha256.zip",
      "region": "us-east-1",
      "layers": ["example_layer_key"],
      "configuration": {
        "FunctionName": "example_function_name",
        "Handler": "example_handler",
        "Runtime": "nodejs22.x",
        "MemorySize": 1024,
        "Timeout": 300,
        "Architectures": ["x86_64"],
        "Environment": {
          "Variables": {
            "EXAMPLE_VARIABLE": "example_value"
          }
        },
        "Tags": {
          "example_tag_key": "example_tag_value"
        }
      }
    }
  ]
}

A provisioning tool must do the following for every deployment:

  1. Publish layers per region: For each region that a function uses, publish every layer it references. Use the layer key as the layer name, and reuse an existing layer version when its code hash matches the ZIP file.
  2. Create functions: Create each function in its region with its configuration, plus Role, Code, and Layers.
  3. Wait for Active: Wait until every function reaches the Lambda Active state before running vercel deploy continue.
  4. Grant invocation: Make sure the invocation role allows lambda:InvokeFunction on every created function.
  5. Record an inventory: Save the ARNs of the functions and layer versions you created, so you can retry and clean up later.

Finish steps 1 to 4 and run vercel deploy continue within 15 minutes of vercel deploy init.

Edgenivo invokes functions by their generated names, and your build depends on the generated runtime settings. Keep these values exactly as they appear in the descriptor:

  • FunctionName
  • Handler
  • Runtime, Architectures, MemorySize, Timeout, and EphemeralStorage
  • Environment.Variables
  • Tags
  • The layer order in layers

You can add settings that the descriptor doesn't define, such as a VPC configuration, additional layers, or extra tags, through your provisioning tool. If you attach functions to a VPC, give the execution role the permissions Lambda needs to manage network interfaces, such as the AWS managed policy AWSLambdaVPCAccessExecutionRole, and route the subnets through a NAT gateway or equivalent egress.

A function with the same name can already exist, for example from an earlier attempt at the same deployment. Reuse an existing function only when its code hash and full configuration match the descriptor. Don't update or overwrite a function that differs, because it may serve another deployment that's still receiving traffic. Stop and investigate the conflict instead.

AWS Lambda accepts function ZIP files up to 50 MB when you upload them directly. For larger packages, upload the ZIP file to a private Amazon S3 bucket in the same region as the function and create the function from the bucket. The standard Edgenivo Functions bundle size limits still apply. See BYOC limitations.

The identity that runs your provisioning tool needs permission to publish layers, create and read functions, tag them, and pass the execution role to Lambda. This example policy covers those actions. Replace <AWS_ACCOUNT_ID> with your AWS account ID and byoc-lambda-execution with your execution role name:

provisioner-policy.json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ManageByocLayers",
      "Effect": "Allow",
      "Action": [
        "lambda:ListLayerVersions",
        "lambda:GetLayerVersion",
        "lambda:PublishLayerVersion"
      ],
      "Resource": "*"
    },
    {
      "Sid": "ManageByocFunctions",
      "Effect": "Allow",
      "Action": [
        "lambda:CreateFunction",
        "lambda:GetFunction",
        "lambda:GetFunctionConfiguration",
        "lambda:TagResource"
      ],
      "Resource": "arn:aws:lambda:*:<AWS_ACCOUNT_ID>:function:*"
    },
    {
      "Sid": "PassExecutionRole",
      "Effect": "Allow",
      "Action": "iam:PassRole",
      "Resource": "arn:aws:iam::<AWS_ACCOUNT_ID>:role/byoc-lambda-execution",
      "Condition": {
        "StringEquals": {
          "iam:PassedToService": "lambda.amazonaws.com"
        }
      }
    }
  ]
}

Add s3:PutObject and s3:GetObject on your staging bucket if you upload large packages through Amazon S3, and lambda:DeleteFunction and lambda:DeleteLayerVersion if the same identity runs cleanup. Don't grant AdministratorAccess to the provisioning identity.

The route mapping file, provision.json, maps each function route in your build to the Lambda function that serves it. Edgenivo reads it to decide which function to invoke for a request. Don't edit it.

FieldTypeDescription
KeystringThe function's route path in the build output
awsAccountIdstringThe AWS account that hosts the function
functionNamestringThe Lambda function name Edgenivo invokes
regionsstring[]The AWS regions the function runs in
digeststringThe hash of the function package
sizenumberThe size of the function package in bytes

A BYOC deployment includes a manualProvisioning object in the Edgenivo REST API deployment response, for example from GET /v13/deployments/{idOrUrl}. The deployment stays in the INITIALIZING state until you run vercel deploy continue.

manualProvisioning.stateMeaning
PENDINGThe deployment is waiting for you to provision its functions and run vercel deploy continue
COMPLETEEdgenivo received the continuation. manualProvisioning.completedAt holds the completion timestamp.
TIMEOUT15 minutes passed without a continuation, and the deployment failed
CommandPurpose
vercel deploy init --target <environment> --jsonCreate a deployment that waits for provisioning. Uploads no files.
vercel build --id <deployment-id> --target <environment>Build with the deployment's environment variables
vercel deploy describe --id <deployment-id> --aws-account-id <aws-account-id>Generate descriptor.json, function packages, and the code-free output. Add --json for machine-readable output.
vercel deploy continue --id <deployment-id>Upload the code-free output and provision.json, then wait for the deployment to finish
vercel deploy continue --id <deployment-id> --error "<reason>"Mark a pending deployment as failed
vercel inspect <deployment-id> --waitWait for the deployment to finish and show its status
vercel curl <path> --deployment <deployment-id>Send a request to a specific deployment

vercel deploy describe requires Edgenivo CLI 62.7.0 or later. Use Edgenivo CLI 63.1.2 or later for BYOC deployments.

EventWhen it firesUsed for
deployment.build-requestedEdgenivo created a BYOC deployment from a Git push and is waiting for your environment to build itStarting builds from Git. See Deploying with BYOC from GitHub Actions.
deployment.cleanupA deployment is permanently deleted, after its 30-day recovery periodTriggering AWS resource cleanup. See Cleanup and retention.

For webhook payloads, see the webhooks API reference.


Was this helpful?

supported.