Skip to content

docs: converting code snippets to code blocks #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,23 @@ The AWS base images for Lambda include the runtime interface emulator. You can a

1. Build your image locally using the docker build command.

`docker build -t myfunction:latest .`
```
docker build -t myfunction:latest .
```

2. Run your container image locally using the docker run command.

`docker run -p 9000:8080 myfunction:latest`
```
docker run -p 9000:8080 myfunction:latest
```

This command runs the image as a container and starts up an endpoint locally at `localhost:9000/2015-03-31/functions/function/invocations`.

3. Post an event to the following endpoint using a curl command:

`curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'`
```
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'
```

This command invokes the function running in the container image and returns a response.

Expand Down Expand Up @@ -125,7 +131,9 @@ To download the RIE for arm64 architecture, use the previous command with a diff

3. Post an event to the following endpoint using a curl command:

`curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'`
```
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'
```

This command invokes the function running in the container image and returns a response.

Expand Down