Skip to main content
POST
/
api
/
lambda-builds
/
trigger
/
{projectId}
Trigger a Lambda build for a project (API Key)
curl --request POST \
  --url https://api.leanmcp.com/api/lambda-builds/trigger/{projectId} \
  --header 'Authorization: Bearer <token>'
{
  "id": "f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454",
  "projectId": "a1b2c3d4-5678-90ab-cdef-11111111111",
  "awsBuildId": "dev-mcp-lambda-builds:12345678-1234-5678-abcd-12345678abcd",
  "status": "in_progress",
  "s3SourceLocation": "dev-mcp-projects/userId/projectId/source.zip",
  "ecrRepository": "767398153015.dkr.ecr.us-west-2.amazonaws.com/dev-mcp-lambda-services",
  "imageUri": "767398153015.dkr.ecr.us-west-2.amazonaws.com/dev-mcp-lambda-services:1702800000",
  "logGroupName": "/aws/codebuild/dev-mcp-lambda-builds",
  "logStreamName": "12345678-1234-5678-abcd-12345678abcd",
  "currentPhase": "BUILD",
  "errorMessage": "Build failed: npm install returned non-zero exit code",
  "startTime": "2023-01-01T00:00:00.000Z",
  "endTime": "2023-01-01T00:10:00.000Z",
  "createdAt": "2023-01-01T00:00:00.000Z",
  "updatedAt": "2023-01-01T00:10:00.000Z"
}

Authorizations

Authorization
string
header
required

Enter your LeanMCP API key

Path Parameters

projectId
string
required

Project ID

Response

Lambda build triggered successfully

id
string
required

Unique ID of the Lambda build

Example:

"f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454"

projectId
string
required

ID of the project this build belongs to

Example:

"a1b2c3d4-5678-90ab-cdef-11111111111"

awsBuildId
string
required

AWS CodeBuild ID

Example:

"dev-mcp-lambda-builds:12345678-1234-5678-abcd-12345678abcd"

status
enum<string>
required

Current status of the build

Available options:
pending,
in_progress,
succeeded,
failed,
stopped
Example:

"in_progress"

s3SourceLocation
string
required

S3 location of the source code

Example:

"dev-mcp-projects/userId/projectId/source.zip"

ecrRepository
string
required

ECR repository URI for the Lambda image

Example:

"767398153015.dkr.ecr.us-west-2.amazonaws.com/dev-mcp-lambda-services"

imageUri
string
required

Docker image URI with tag

Example:

"767398153015.dkr.ecr.us-west-2.amazonaws.com/dev-mcp-lambda-services:1702800000"

logGroupName
string
required

CloudWatch log group name

Example:

"/aws/codebuild/dev-mcp-lambda-builds"

logStreamName
string
required

CloudWatch log stream name

Example:

"12345678-1234-5678-abcd-12345678abcd"

currentPhase
string
required

Current phase of the build

Example:

"BUILD"

errorMessage
string
required

Error message if build failed

Example:

"Build failed: npm install returned non-zero exit code"

startTime
string
required

Build start time

Example:

"2023-01-01T00:00:00.000Z"

endTime
string
required

Build end time

Example:

"2023-01-01T00:10:00.000Z"

createdAt
string
required

Build creation time

Example:

"2023-01-01T00:00:00.000Z"

updatedAt
string
required

Build last update time

Example:

"2023-01-01T00:10:00.000Z"