5
5
Some node and python modules require a build system because they contain c++ binding. Once deployed, the compiled
6
6
module may not be complatible with the Amazon Lambda execution environment.
7
7
8
- A common solution to this problem is to install the package on an EC2 instance using an Amazon Linux AMI and then to
9
- deploy it in Amazon Lambda. Building serverless applications, it is ironic to be obliged to use a server to deploy code.
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
+ 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
11
This docker image is based on the [ Amazon Linux] ( https://hub.docker.com/_/amazonlinux/ ) image and contains ` gcc ` ,
12
12
` python 2.7 ` , ` python 3.6 ` , ` pip ` , ` node 4.3 ` , ` node 6.10 ` and ` npm 4 ` to create packages for Amazon Lambda.
13
13
14
- Using the docker image ` myrmex/lambda-packager ` , avoid errors like these during execution in Amazon Lambda:
14
+ Using the docker image ` myrmex/lambda-packager ` , you can avoid errors like these during execution in Amazon Lambda:
15
15
16
16
```
17
17
/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)
@@ -23,7 +23,7 @@ Module version mismatch. Expected 46, got 48.
23
23
24
24
## Usage
25
25
26
- You can use a docker volume to mount the code of the Lambda it in a container. The directory where ` npm install ` or
26
+ You can use a docker volume to mount the code of the Lambda in a container. The directory where ` npm install ` or
27
27
` pip install ` is executed inside the container is ` /data ` . By default, the installation will be performed for node
28
28
6.10.
29
29
@@ -38,7 +38,7 @@ For a node package, take care that `node_module` does not already exist before r
38
38
39
39
### Managing permissions
40
40
41
- The user that performs ` npm install ` or ` pip install ` inside the container may have a ` uid/gid ` that differs from the
41
+ The user account that performs ` npm install ` or ` pip install ` inside the container may have a ` uid/gid ` that differs from the
42
42
` uid/gid ` of the host machine and will not be able to perform the installation. The image ` myrmex/lambda-packager `
43
43
accepts two environment variables that allows to modify the ` uid/gid ` of the container's user: ` HOST_UID ` and
44
44
` HOST_GID ` . If ` HOST_GID ` is omitted, its value will be set to the value of ` HOST_UID ` .
0 commit comments