Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vpchung committed Dec 20, 2024
1 parent f415005 commit 8696d8d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/openchallenges/data-lambda/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Sandbox Lambda Python
# OpenChallenges Data Lambda

## Build the project

```console
nx build sandbox-lambda-python
nx build openchallenges-data-lambda
```

## Build the Docker image of the Lambda function

```console
nx build-image sandbox-lambda-python
nx build-image openchallenges-data-lambda
```

## Start the Lambda function locally with Docker Compose
Expand All @@ -18,28 +18,28 @@ Starts the Lambda function in the foreground, allowing you to view logs and inte
directly.

```console
nx serve sandbox-lambda-python
nx serve openchallenges-data-lambda
```

Starts the Lambda function in detached mode, running it in the background. This is useful if you
want to continue using the terminal for other tasks while the function runs.

```console
nx serve-detach sandbox-lambda-python
nx serve-detach openchallenges-data-lambda
```

## Invoke the Lambda function locally

To invoke the Lambda function after starting it locally, use the following command:

```console
nx run sandbox-lambda-python:invoke --event <path-to-json-file>
nx run openchallenges-data-lambda:invoke --event <path-to-json-file>
```

Replace `<path-to-json-file>` with the path to your JSON file containing the event payload relative
to the location of the project folder. For example, if your event payload is stored in a file
located at `events/event.json` relative to the project folder:

```console
nx run sandbox-lambda-python:invoke --event events/event.json
nx run openchallenges-data-lambda:invoke --event events/event.json
```

0 comments on commit 8696d8d

Please sign in to comment.