Skip to content

Commit 3909f86

Browse files
committed
Updated links, some reformatting
1 parent 89378e6 commit 3909f86

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
# python-lambda-docker
2-
Lightweight docker image for running and packaging python-based AWS lambda code. This is based on [nficano](https://github.com/nficano/)'s super useful [python-lambda library](https://github.com/nficano/python-lambda/)
32

4-
* [alpine-aws-python-lambda on docker hub](https://hub.docker.com/r/kilna/alpine-aws-python-lambda/)
5-
* [alpine-aws-python-lambda on github](https://github.com/kilna/alpine-aws-python-lambda)
3+
Lightweight docker image for running and packaging python-based AWS lambda code
64

7-
# Purpose
5+
## Links
6+
7+
* Docker: [python-lambda](https://hub.docker.com/r/kilna/python-lambda/)
8+
* GitHub: [python-lambda-docker](https://github.com/kilna/python-lambda-docker)
9+
* Based on the [python-lambda library](https://github.com/nficano/python-lambda/) by [nficano](https://github.com/nficano/)
10+
11+
## Purpose
812

913
I needed a Docker-based environment in which to host AWS python lambda functions for the purpose of testing and building them... python-lambda works well under virtualenv for development, but build and deployment automation require a clean and reproducible environment to operate in. Our CI system already supported Docker as a containerization sytem, so it was the obvious choice.
1014

1115
In order to use this, you will have your project derive its own Dockerfile based on a base python-lambda image corresponding to which version of Python you wish to run.
1216

13-
# Usage
17+
## Usage
1418

1519
An example of a usable project can be found in the [example/](./example/) directory. This lambda function takes a JSON input file like the provided [event.json](./example/event.json) and returns an ASCII-art version of the text described in it. The provided [Dockerfile](./example/Dockerfile) derives from this image and loads the current workspace into the image, then installs dependencies from the [requirements.txt](./example/requirements.txt) file.
1620

@@ -38,7 +42,7 @@ If you would like to see if your lambda function builds properly, run:
3842
$ docker run example-lambda-image lambda build
3943
```
4044

41-
## Build and Test
45+
### Build and Test
4246

4347
If you would like to build and test the lambda function and gather up the results, you can run:
4448

@@ -58,7 +62,7 @@ Behind the scenes, what this script does is:
5862
* Tars the log files, and the contents of the dist directory in /lambda on the container and pipes it to standard output
5963
* Untars the contents bundled up within the container, and extracts them into your current directory
6064

61-
## Python Version
65+
### Python Version
6266

6367
The example Dockerfile uses _:latest_ in the FROM line, which is currently the same as _:python-3.6_, but if you wish to use different python versions you can change this.
6468

0 commit comments

Comments
 (0)