You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-4Lines changed: 38 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,15 @@ module may not be compatible with the Amazon Lambda execution environment.
8
8
A common solution to this problem is to build the package on an EC2 instance using an Amazon Linux AMI and then to
9
9
deploy it in Amazon Lambda. Building serverless applications, it is ironic to be obliged to use an EC2 server to deploy code.
10
10
11
-
This docker image is based on the [Amazon Linux 1](https://hub.docker.com/_/amazonlinux/) image and contains `gcc`,
12
-
`python 2.7`, `python 3.6`, `python 3.7`, `pip`, `node 6.10`, `node 8.10` to create packages for Amazon Lambda.
11
+
This docker image is based on the [Amazon Linux](https://hub.docker.com/_/amazonlinux/) image and contains `gcc`.
13
12
14
-
Using the docker image `myrmex/lambda-packager`, you can avoid errors like these during execution in Amazon Lambda:
13
+
The AWS lambda [runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) are now split between `Amazon Linux` and `Amazon Linux 2` execution environments.
14
+
15
+
The docker image for `Amazon Linux` now contains `python 2.7`, `python 3.6`, `python 3.7`, `pip`, `node 6.10`, `node 8.10` to create packages for Amazon Lambda.
16
+
17
+
The docker image for `Amazon Linux 2` now contains `node 10.15` to create packages for Amazon Lambda.
18
+
19
+
Using the docker images from `myrmex/lambda-packager`, you can avoid errors like these during execution in Amazon Lambda:
15
20
16
21
```
17
22
/var/lang/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /var/task/node_modules/bcrypt/lib/binding/bcrypt_lib.node)
@@ -21,6 +26,24 @@ Using the docker image `myrmex/lambda-packager`, you can avoid errors like these
21
26
Module version mismatch. Expected 46, got 48.
22
27
```
23
28
29
+
## Building
30
+
31
+
To build the required images standard `Dockerfile` have been included one for `Amazon Linux` and another for `Amazon Linux 2`.
32
+
33
+
To build the `Amazon Linux` image that supports node 6.10, node 8.10, python 2.7, python 3.6 and python 3.7
34
+
35
+
```bash
36
+
cd Amazon\ Linux
37
+
docker build -t myrmex/lambda-packager .
38
+
```
39
+
40
+
To build the `Amazon Linux 2` image that supports node 10.15
0 commit comments