You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-15Lines changed: 32 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,24 @@
3
3
Python package to execute meta-analyses created using neurosynth compose and NiMARE
4
4
as the meta-analysis execution engine.
5
5
6
-
## AWS Lambda Deployment
6
+
## AWS Deployment
7
7
8
-
This repository includes an AWS CDK application for provisioning the Lambda-based
9
-
execution environment and log polling function.
8
+
This repository includes an AWS CDK application that turns compose-runner into a
9
+
serverless batch pipeline using Step Functions, AWS Lambda, and ECS Fargate.
10
+
The deployed architecture works like this:
11
+
12
+
-`ComposeRunnerSubmit` (Lambda Function URL) accepts HTTP requests, validates
13
+
the meta-analysis payload, and starts a Step Functions execution. The response
14
+
is immediate and returns both a durable `job_id` (the execution ARN) and the
15
+
`artifact_prefix` used for S3 and log correlation.
16
+
- A Standard state machine runs a single Fargate task (`compose_runner.ecs_task`)
17
+
and waits for completion. The container downloads inputs, executes the
18
+
meta-analysis on up to 4 vCPU / 30 GiB of memory, uploads artifacts to S3, and
19
+
writes `metadata.json` into the same prefix.
20
+
-`ComposeRunnerStatus` (Lambda Function URL) wraps `DescribeExecution`, merges
21
+
metadata from S3, and exposes a simple status endpoint suitable for polling.
22
+
-`ComposeRunnerLogPoller` streams the ECS CloudWatch Logs for a given `artifact_prefix`,
23
+
while `ComposeRunnerResultsFetcher` returns presigned URLs for stored artifacts.
10
24
11
25
1. Create a virtual environment and install the CDK dependencies:
12
26
```bash
@@ -19,21 +33,24 @@ execution environment and log polling function.
19
33
```bash
20
34
cdk bootstrap
21
35
```
22
-
3. Deploy the stack (supplying the compose-runner version you want baked into the Lambda image):
36
+
3. Deploy the stack (supplying the compose-runner version you want baked into the images):
23
37
```bash
24
38
cdk deploy \
25
39
-c composeRunnerVersion=$(hatch version) \
26
40
-c resultsPrefix=compose-runner/results \
27
-
-c runMemorySize=3008 \
28
-
-c runTimeoutSeconds=900
41
+
-c taskCpu=4096 \
42
+
-c taskMemoryMiB=30720
29
43
```
30
-
The deployment output includes HTTPS endpoints for submitting runs (`ComposeRunnerFunctionUrl`), polling logs (`ComposeRunnerLogPollerFunctionUrl`), and fetching presigned S3 URLs (`ComposeRunnerResultsFunctionUrl`).
31
-
Omit `resultsBucketName` to let the stack create a managed bucket, or pass an
32
-
existing bucket name via `-c resultsBucketName=<bucket>`.
44
+
Pass `-c resultsBucketName=<bucket>` to use an existing S3 bucket, or omit it
45
+
to let the stack create and retain a dedicated bucket. Additional knobs:
46
+
47
+
-`-c stateMachineTimeoutSeconds=7200` to control the max wall clock per run
0 commit comments