cdk-lambda-fleet
Advanced tools
Comparing version 1.3.2 to 1.4.0
{ | ||
"name": "cdk-lambda-fleet", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "Deploy multiple AWS Lambda functions as docker images using AWS Cloud Development Kit", | ||
@@ -5,0 +5,0 @@ "main": "aws/constructs/LambdaFleet.js", |
# AWS CDK: Lambda Fleet | ||
[![MIT License](https://badgen.now.sh/badge/License/MIT/purple?1)](https://github.com/sbstjn/cdk-lambda-fleet/blob/master/LICENSE.md) | ||
[![MIT License](https://badgen.net/npm/v/cdk-lambda-fleet?1)](https://www.npmjs.com/package/cdk-lambda-fleet) | ||
[![MIT License](https://badgen.now.sh/badge/License/MIT/purple?3)](https://github.com/sbstjn/cdk-lambda-fleet/blob/master/LICENSE.md) | ||
[![cdk-lambda-fleet on NPM](https://badgen.net/npm/v/cdk-lambda-fleet?3)](https://www.npmjs.com/package/cdk-lambda-fleet) | ||
> Deploy multiple AWS Lambda functions as container images to ECR with CDK. | ||
> Deploy multiple AWS Lambda functions as container images to Amazon ECR with CDK. | ||
## Intention | ||
## Examples | ||
Have a CloudFormation stack with multiple AWS Lambda functions in different langauges. | ||
- [`src/lambda-node-example`](src/lambda-node-example) | ||
- [`src/lambda-python-example`](src/lambda-python-example) | ||
- [`src/lambda-typescript-example`](src/lambda-typescript-example) | ||
## Usage | ||
You can fork this repository and create a folder like `src/lambda-node-example` and store a `Dockerfile` there: | ||
```Dockerfile | ||
FROM amazon/aws-lambda-nodejs:12 | ||
ARG FUNCTION_DIR="/var/task" | ||
RUN mkdir -p ${FUNCTION_DIR} | ||
COPY package.json ${FUNCTION_DIR} | ||
RUN npm install | ||
COPY handler.js ${FUNCTION_DIR} | ||
CMD [ "handler.run" ] | ||
``` | ||
Using the **AWS CDK**, a docker image will be created and deployed to **Amazon ECR** for every folder in `src/`. After uploading the image, an **AWS Lambda** will be created or updated to use the latest image. | ||
## CDK Construct | ||
@@ -59,8 +39,18 @@ | ||
## Examples | ||
### Configuration | ||
- [`src/lambda-node-example`](src/lambda-node-example) | ||
- [`src/lambda-python-example`](src/lambda-python-example) | ||
- [`src/lambda-typescript-example`](src/lambda-typescript-example) | ||
You can fork this repository and create a folder like `src/lambda-python-example` and store a `Dockerfile` there: | ||
```Dockerfile | ||
FROM amazon/aws-lambda-python:3.8 | ||
COPY requirements.txt ./ | ||
RUN pip install -r requirements.txt | ||
COPY handler.py ./ | ||
CMD [ "handler.run" ] | ||
``` | ||
Using the **AWS CDK**, a docker image will be created and deployed to **Amazon ECR** for every folder in `src/`. After uploading the image, an **AWS Lambda** will be created or updated to use the latest image. | ||
## Deployment | ||
@@ -72,7 +62,5 @@ | ||
$ > yarn deploy | ||
``` | ||
## Usage | ||
[…] | ||
```r | ||
Fleet.FleetLambdaNodeExampleArnXYZ = "arn:aws:lambda:eu-central-1:123:function:Fleet-FleetLambdaNodeExampleXYZ-XYZ" | ||
@@ -79,0 +67,0 @@ Fleet.FleetLambdaPythonExampleArnXYZ = "arn:aws:lambda:eu-central-1:123:function:Fleet-FleetLambdaPythonExampleXYZ-XYZ" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10676
68