Skip to content

Commit

Permalink
Improve the example in the README
Browse files Browse the repository at this point in the history
The `bundler` gem is required to build the docker image and
also the full path to the `aws_lambda_ric` binary is required to
run it.
  • Loading branch information
edhzsz committed Dec 1, 2020
1 parent 5e669fe commit 7d7c859
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ ARG FUNCTION_DIR="/function"
# Install ruby
RUN amazon-linux-extras install -y ruby2.6

# Install bundler
RUN gem install bundler

# Install the Runtime Interface Client
RUN gem install aws_lambda_ric

Expand All @@ -68,7 +71,7 @@ COPY app.rb ${FUNCTION_DIR}

WORKDIR ${FUNCTION_DIR}

ENTRYPOINT ["aws_lambda_ric"]
ENTRYPOINT ["/usr/local/bin/aws_lambda_ric"]
CMD ["app.App::Handler.process"]
```

Expand Down Expand Up @@ -102,7 +105,7 @@ mkdir -p ~/.aws-lambda-rie && \
docker run -d -v ~/.aws-lambda-rie:/aws-lambda -p 9000:8080 \
--entrypoint /aws-lambda/aws-lambda-rie \
myfunction:latest \
aws_lambda_ric app.App::Handler.process
/usr/local/bin/aws_lambda_ric app.App::Handler.process
```

This runs the image as a container and starts up an endpoint locally at `http://localhost:9000/2015-03-31/functions/function/invocations`.
Expand Down Expand Up @@ -144,4 +147,5 @@ If you discover a potential security issue in this project we ask that you notif

## License

This project is licensed under the Apache-2.0 License.
This project is licensed under the Apache-2.0 License.

0 comments on commit 7d7c859

Please sign in to comment.