{"id":15914658,"url":"https://github.com/sbstjn/cdk-lambda-fleet","last_synced_at":"2025-03-23T01:31:30.455Z","repository":{"id":57195480,"uuid":"319058919","full_name":"sbstjn/cdk-lambda-fleet","owner":"sbstjn","description":"Deploy AWS Lambda functions using docker images to ECR with AWS CDK","archived":false,"fork":false,"pushed_at":"2020-12-06T18:46:03.000Z","size":98,"stargazers_count":20,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-15T17:07:33.942Z","etag":null,"topics":["aws","aws-cdk","cdk","construct","lambda","serverless"],"latest_commit_sha":null,"homepage":"https://sbstjn.com/blog/aws-cdk-lambda-fleet-multiple-docker-images-container/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbstjn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-06T14:57:47.000Z","updated_at":"2025-01-11T04:28:41.000Z","dependencies_parsed_at":"2022-09-17T03:11:47.891Z","dependency_job_id":null,"html_url":"https://github.com/sbstjn/cdk-lambda-fleet","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fcdk-lambda-fleet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fcdk-lambda-fleet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fcdk-lambda-fleet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fcdk-lambda-fleet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbstjn","download_url":"https://codeload.github.com/sbstjn/cdk-lambda-fleet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245043978,"owners_count":20551859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-cdk","cdk","construct","lambda","serverless"],"created_at":"2024-10-06T17:05:04.996Z","updated_at":"2025-03-23T01:31:30.158Z","avatar_url":"https://github.com/sbstjn.png","language":"TypeScript","readme":"# AWS CDK: Lambda Fleet\n\n[![MIT License](https://badgen.now.sh/badge/License/MIT/purple?3)](https://github.com/sbstjn/cdk-lambda-fleet/blob/master/LICENSE.md)\n[![cdk-lambda-fleet on NPM](https://badgen.net/npm/v/cdk-lambda-fleet?3)](https://www.npmjs.com/package/cdk-lambda-fleet)\n\n\u003e Deploy multiple AWS Lambda functions as container images to Amazon ECR with CDK.\n\n## Examples\n\n- [`src/lambda-node-example`](src/lambda-node-example)\n- [`src/lambda-python-example`](src/lambda-python-example)\n- [`src/lambda-typescript-example`](src/lambda-typescript-example)\n\n## CDK Construct\n\nWhen using the AWS CDK in TypeScript, you can use the published `LambdaFleet` construct:\n\n```bash\n$ \u003e yarn install cdk-lambda-fleet\n```\n\n```typescript\nimport * as path from \"path\";\nimport * as cdk from \"@aws-cdk/core\";\n\nimport { LambdaFleet } from \"cdk-lambda-fleet\";\n\nexport class FleetStack extends cdk.Stack {\n  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {\n    super(scope, id, props);\n\n    new LambdaFleet(this, \"Fleet\", {\n      path: path.resolve(__dirname, \"../src\"),\n    });\n  }\n}\n```\n\n### Configuration\n\nYou can fork this repository and create a folder like `src/lambda-python-example` and store a `Dockerfile` there:\n\n```Dockerfile\nFROM amazon/aws-lambda-python:3.8\n\nCOPY requirements.txt ./\nRUN pip install -r requirements.txt\nCOPY handler.py ./\n\nCMD [ \"handler.run\" ]\n```\n\nUsing 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.\n\n## Deployment\n\n```bash\n# Deploy all functions\n\n$ \u003e yarn deploy\n\n[…]\n\nFleet.FleetLambdaNodeExampleArnXYZ = \"arn:aws:lambda:eu-central-1:123:function:Fleet-FleetLambdaNodeExampleXYZ-XYZ\"\nFleet.FleetLambdaPythonExampleArnXYZ = \"arn:aws:lambda:eu-central-1:123:function:Fleet-FleetLambdaPythonExampleXYZ-XYZ\"\nFleet.FleetLambdaTypescriptExampleArnXYZ = \"arn:aws:lambda:eu-central-1:123:function:Fleet-FleetLambdaTypescriptExampleXYZ-XYZ\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Fcdk-lambda-fleet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbstjn%2Fcdk-lambda-fleet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Fcdk-lambda-fleet/lists"}