Skip to content

Commit b2e28ef

Browse files
authored
Update README.md
1 parent a0ca525 commit b2e28ef

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,32 @@ This is based on the super useful python-lambda library:
77

88
# Usage
99

10-
An example of a usable project can be found in the <example/> directory. This example lambda function
10+
An example of a usable project can be found in the `example/` directory. This example lambda function
1111
takes a JSON input file like event.json and returns an ASCII-art version of the text.
1212

13-
```$ cd example/
13+
```
14+
$ cd example/
1415
```
1516

1617
The Dockerfile in the example directory loads the current workspace into the image and installs
1718
dependencies from the requirements.txt file:
1819

19-
```FROM kilna/alpine-aws-python-lambda
20+
```
21+
FROM kilna/alpine-aws-python-lambda
2022
COPY . /workspace
2123
RUN pip install -r requirements.txt
2224
```
2325

2426
To build a docker image called 'example-lambda-image' with the lambda function in it, run:
2527

26-
```$ docker build --tag example-lambda-image .
28+
```
29+
$ docker build --tag example-lambda-image .
2730
```
2831

2932
If you want to execute the lambda function against an event.json input file:
3033

31-
```$ docker run example-lambda-image lambda invoke
34+
```
35+
$ docker run example-lambda-image lambda invoke
3236
_ _ _ _ _ _ _
3337
| || | ___ | | | | ___ __ __ __ ___ _ _ | | __| | | |
3438
| __ | / -_) | | | | / _ \ _ \ V V / / _ \ | '_| | | / _` | |_|
@@ -39,13 +43,13 @@ If you want to execute the lambda function against an event.json input file:
3943

4044
If you would like to see if your lambda function builds properly, run:
4145

42-
```$ docker run example-lambda-image lambda build
46+
```
47+
$ docker run example-lambda-image lambda build
4348
```
4449

4550
If you would like to get a ZIP file of the lambda function suitable for uploading to Amazon:
4651

47-
```$ docker run example-lambda-image sh -c 'rm -rf dist* && lambda build 2&>1 >/dev/null && tar -c dist/*.zip' | tar -x -v
52+
```
53+
$ docker run example-lambda-image sh -c 'rm -rf dist* && lambda build 2&>1 >/dev/null && tar -c dist/*.zip' | tar -x -v
4854
dist/2017-08-31-212523-example-lambda.zip
4955
```
50-
51-

0 commit comments

Comments
 (0)