Trigger AWS Lambda functions, AWS Batch jobs, and AWS CodeBuild builds from the VS Code sidebar. Declare them in JSON config files; CloudSpark lists them and runs them on click.
Credentials
CloudSpark reads your AWS credentials automatically, in order: AWS_* environment
variables → ~/.aws/credentials / ~/.aws/config → SSO cache → EC2/ECS instance
roles. The aws CLI is not required. Files are re-read on every trigger, so
if your keys expire you can paste in fresh ones and the next run picks them up —
no IDE restart needed.
[default]
aws_access_key_id = AKIA...
aws_secret_access_key = ...
Config files
Default per-user location (available in every window):
~/.cloudspark/aws-lambdas.json~/.cloudspark/aws-batch-jobs.json~/.cloudspark/aws-codebuild.json
Open the CloudSpark view in the Activity Bar and click Create Config File to
scaffold a template. To use a workspace-specific file, set
cloudspark.lambdaConfigPath / cloudspark.batchConfigPath /
cloudspark.codebuildConfigPath to a relative path (e.g. .vscode/aws-lambdas.json).
Lambda
{
"functions": [
{
"label": "Process daily report",
"functionName": "my-report-fn",
"region": "us-east-1",
"payload": { "date": "2026-01-01" },
"invocationType": "RequestResponse",
"override": true
}
]
}
| Field | Required | Notes |
|---|---|---|
functionName |
yes | Lambda function name or ARN. |
region |
yes | The AWS region this function lives in (e.g. us-east-2). |
label |
no | Display name in the tree (defaults to functionName). |
payload |
no | JSON sent as the event. |
invocationType |
no | RequestResponse (sync, default) or Event (async fire-and-forget). |
override |
no | When true, prompts to edit the payload before each run. |
project |
no | Groups entries sharing the value under a folder row; entries without one stay at the top level. |
destructive |
no | When true, shows a confirmation before running. |
Batch
{
"jobs": [
{
"label": "Nightly ETL",
"jobName": "nightly-etl",
"jobQueue": "my-job-queue",
"jobDefinition": "my-job-def:1",
"region": "us-east-1",
"command": ["python", "run.py", "--full"],
"override": false
}
]
}
| Field | Required | Notes |
|---|---|---|
jobName |
yes | Name for the submitted job. |
jobQueue |
yes | Batch job queue. |
jobDefinition |
yes | Batch job definition (name or name:revision). |
region |
yes | The AWS region this job runs in (e.g. us-east-2). |
command |
no | Container command override (JSON array of strings). |
label |
no | Display name in the tree. |
override |
no | When true, prompts to edit the command before each run. |
project |
no | Groups jobs sharing the value under a folder row. |
destructive |
no | When true, shows a confirmation before submitting. |
container |
no | For multi-container ECS jobs — see below. Replaces the classic command/override. |
parameters |
no | Map of name → value that fills Ref::name placeholders in the job definition — see below. |
Multi-container ECS jobs (container)
Job definitions built with ecsProperties can hold several containers, so an
override must target one by name. Use a container block; each property is a
{ "value": …, "override": true|false } pair, where override: true prompts you
to edit that value at trigger time.
{
"jobName": "ecs-etl",
"jobQueue": "my-job-queue",
"jobDefinition": "my-ecs-def:3",
"region": "us-east-1",
"container": {
"name": { "value": "main", "override": true },
"command": { "value": ["python", "run.py", "--full"], "override": true }
}
}
| Container field | Required | Notes |
|---|---|---|
name.value |
yes | Container name to target (must match one in the job definition). |
name.override |
no | When true, prompts to edit the name before each run. |
command.value |
no | Command for that container (JSON array of strings). |
command.override |
no | When true, prompts to edit the command before each run. |
Parameters (parameters)
AWS Batch parameters fill Ref::name placeholders defined in the job
definition's command. Each value is either a plain string (static) or a
{ "value": …, "override": true } object that prompts you to edit it at trigger
time. Parameters work alongside command or container (they are a separate
SubmitJob field).
{
"jobName": "nightly-etl",
"jobQueue": "my-job-queue",
"jobDefinition": "my-job-def:1",
"region": "us-east-1",
"parameters": {
"mode": "full",
"runDate": { "value": "2026-01-01", "override": true }
}
}
CodeBuild
Start a build for a CodeBuild project, optionally choosing the branch and overriding environment variables. Every CodeBuild build asks for confirmation before it starts.
{
"projects": [
{
"label": "Deploy web app",
"projectName": "my-app-build",
"region": "us-east-1",
"branch": { "value": "master", "override": true },
"environment": {
"ENV": { "value": "dev", "override": true }
}
}
]
}
| Field | Required | Notes |
|---|---|---|
projectName |
yes | The CodeBuild project to start a build for. |
region |
yes | The AWS region the project lives in (e.g. us-east-1). |
label |
no | Display name in the tree (defaults to projectName). |
branch |
no | { "value": …, "override": true|false } — the branch/tag/commit to build (AWS sourceVersion). Defaults to master when omitted; override: true prompts before each run. |
environment |
no | Map of NAME → value overriding the project's environment variables (AWS environmentVariablesOverride, sent as PLAINTEXT). Each value is a plain string (static) or { "value": …, "override": true } to prompt at trigger time. |
project |
no | Groups projects sharing the value under a folder row. |
Notes
- Every entry carries its own
region— there is no file-level region. A block missing one is flagged as an error in the tree. - In a row's description,
O↑marks an override entry (prompts to edit before running) and⚠marks an entry that asks for confirmation (adestructiveLambda/Batch entry, or any CodeBuild build). Hover for details. - Results and errors stream to the CloudSpark output channel.