Skip to content

Commit e59538e

Browse files
authored
docs: add a note to the README about deploying container image (#549)
1 parent cf80c6a commit e59538e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ DEPLOY_TIMEOUT // (default: '120000')
9898
DOCKER_IMAGE // (default: '')
9999
DEPLOY_ZIPFILE // (default: '')
100100
DEPLOY_USE_S3 // (default: false)
101+
IMAGE_URI // (default: '')
101102
AWS_DLQ_TARGET_ARN // (default: not set)
102103
AWS_TAGS // (default: '')
103104
```
@@ -198,6 +199,7 @@ Options:
198199
-T, --deployTimeout [120000] Deploy Timeout
199200
-z, --deployZipfile [] Deploy zipfile
200201
-B, --deployUseS3 [] Use S3 to deploy.
202+
-i, --imageUri [] URI of a container image in the Amazon ECR registry. (default: "")
201203
-y, --proxy [] Proxy server
202204
-A, --tags [] Tags as key value pairs (e.g. "tagname1=tagvalue1,tagname2=tagvalue2") (default: "")
203205
--silent Silent or quiet mode (default: false)
@@ -217,6 +219,11 @@ AWS Lambda will let you set environment variables for your function. Use the sam
217219

218220
AWS Lambda now supports Node.js 12 and Node.js 10. Please also check the [Programming Model (Node.js)](http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) page.
219221

222+
## To deploy a container image to Lambda
223+
224+
1. [Pushing a Docker image to ECR](https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html)
225+
2. Specify the Image URI of the ECR with the environment variable:`IMAGE_URI` or `--imageUri` option, and deploy.
226+
220227
## Post install script
221228
When running `node-lambda deploy` if you need to do some action after `npm install --production` and before deploying to AWS Lambda (e.g. replace some modules with precompiled ones or download some libraries, replace some config file depending on environment) you can create `post_install.sh` script. If the file exists the script will be executed (and output shown after execution) if not it is skipped. Environment string is passed to script as first parameter so you can use it if needed. Make sure that the script is executable.
222229

0 commit comments

Comments
 (0)