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
+12-31Lines changed: 12 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,17 +27,22 @@ Prerequisites:
27
27
- Docker
28
28
- aws-sam-cli (`brew install aws-sam-cli`)
29
29
30
-
To start local server (including rdf4j database server, cdk synth and sam)
31
-
First, make sure to start LocalStack:
30
+
To start local server, first make sure to start LocalStack:
32
31
```
33
32
npm run localstack:start
34
33
```
35
34
36
-
Then, you can start the local server:
37
-
```
35
+
By default, `start-local` enables Redis with the local container settings from `bin/env/local_env.sh`, so the normal local startup path is:
36
+
```bash
37
+
npm run redis:start
38
38
npm run start-local
39
39
```
40
40
41
+
If you do not need Redis for your local test, start local with Redis disabled:
42
+
```bash
43
+
REDIS_ENABLED=false npm run start-local
44
+
```
45
+
41
46
To run local server with SAM watch mode enabled
42
47
```
43
48
npm run start-local:watch
@@ -51,35 +56,11 @@ Local development intentionally splits responsibilities between SAM and LocalSta
51
56
- LocalStack emulates AWS-managed services that SAM does not model end-to-end for this repo, especially SNS and SQS.
52
57
- RDF4J and Redis remain separate local services because they are not AWS services.
53
58
54
-
We do not run the entire application stack inside LocalStack because the existing SAM flow is simpler for day-to-day Lambda/API development, while LocalStack is most useful here for the managed messaging pieces. For keyword event processing, `npm run start-local` also starts [`scripts/local/run_localstack_cmr_keyword_events_bridge.js`], which polls the LocalStack SQS queue and forwards messages into the local CMR consumer handler. This bridge exists because `sam local start-api` does not emulate SQS event source mappings the way AWS does in deployed environments.
59
+
We do not run the entire application stack inside LocalStack because the existing SAM flow is simpler for day-to-day Lambda/API development, while LocalStack is most useful here for the managed messaging pieces. For keyword event processing, `npm run start-local` also starts `scripts/localstack/run_bridge.sh`, which runs `scripts/localstack/bridge.js`.
55
60
56
-
### Testing keyword event publishing in SIT
61
+
This bridge exists because `sam local start-api` does not emulate EventBridge targets or SQS event source mappings the way AWS does in deployed environments.
57
62
58
-
After deploying to SIT, you can exercise the keyword event publisher with:
59
-
60
-
```bash
61
-
curl -H "Authorization: Bearer $TOKEN" -X POST https://cmr.sit.earthdata.nasa.gov/kms/keyword-events/test \
0 commit comments