Skip to main content
POST
/
api
/
lambda-deploy
Create a new Lambda deployment from a build (API Key)
curl --request POST \
  --url https://api.leanmcp.com/api/lambda-deploy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "buildId": "<string>",
  "functionName": "<string>",
  "memorySize": 512,
  "timeout": 30,
  "architecture": "x86_64"
}
'
{
  "id": "<string>",
  "buildId": "<string>",
  "projectId": "<string>",
  "firebaseUid": "<string>",
  "functionName": "<string>",
  "functionArn": "<string>",
  "imageUri": "<string>",
  "status": "PENDING",
  "functionUrl": "<string>",
  "mcpEndpoint": "<string>",
  "healthEndpoint": "<string>",
  "roleArn": "<string>",
  "architecture": "<string>",
  "memorySize": 123,
  "timeout": 123,
  "lastHealthCheck": "<string>",
  "lastHealthCheckAt": "<string>",
  "errorMessage": "<string>",
  "region": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Authorizations

Authorization
string
header
required

Enter your LeanMCP API key

Body

application/json
buildId
string
required

ID of the Lambda build to deploy

functionName
string

Custom function name (optional, will be auto-generated)

memorySize
number
default:512

Memory size in MB (128-10240)

timeout
number
default:30

Timeout in seconds (1-900)

architecture
string
default:x86_64

Architecture (x86_64 or arm64)

Response

Lambda deployment created successfully

id
string
required

Unique identifier for the Lambda deployment

buildId
string
required

Related Lambda build ID

projectId
string
required

Project ID the deployment is associated with

firebaseUid
string
required

User ID of the owner (Firebase UID)

functionName
string
required

Name of the Lambda function

functionArn
string
required

ARN of the Lambda function

imageUri
string
required

URL of the ECR image deployed

status
enum<string>
required

Current status of the deployment

Available options:
PENDING,
CREATING_ROLE,
CREATING_FUNCTION,
CONFIGURING_URL,
RUNNING,
UPDATING,
FAILED,
DELETING,
DELETED,
REPLACED
functionUrl
string
required

Lambda Function URL

mcpEndpoint
string
required

MCP endpoint URL

healthEndpoint
string
required

Health check endpoint URL

roleArn
string
required

IAM role ARN for the Lambda function

architecture
string
required

Lambda architecture (x86_64 or arm64)

memorySize
number
required

Memory size in MB

timeout
number
required

Timeout in seconds

lastHealthCheck
string
required

Last health check status

lastHealthCheckAt
string
required

Last health check timestamp

errorMessage
string
required

Error message if deployment failed

region
string
required

AWS region where the Lambda is deployed

createdAt
string
required

Timestamp of when the deployment was created

updatedAt
string
required

When the deployment was last updated