{"id":13602697,"url":"https://github.com/ran-isenberg/aws-lambda-handler-cookbook","last_synced_at":"2026-04-15T18:04:22.828Z","repository":{"id":37056475,"uuid":"343110484","full_name":"ran-isenberg/aws-lambda-handler-cookbook","owner":"ran-isenberg","description":"This repository provides a working, deployable, open source-based, serverless service blueprint with an AWS Lambda function and AWS CDK Python code with all the best practices and a complete CI/CD pipeline.","archived":false,"fork":false,"pushed_at":"2026-04-02T15:05:40.000Z","size":6913,"stargazers_count":671,"open_issues_count":0,"forks_count":60,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-04-03T08:33:26.676Z","etag":null,"topics":["aws","aws-lambda","best-practices","blueprint","cdk","cookbook","pipeline","python","serverless","serverless-aws","template","template-repository"],"latest_commit_sha":null,"homepage":"https://ran-isenberg.github.io/aws-lambda-handler-cookbook/","language":"Python","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/ran-isenberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"ran-isenberg","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-02-28T13:20:25.000Z","updated_at":"2026-04-02T13:37:44.000Z","dependencies_parsed_at":"2023-02-19T12:45:57.724Z","dependency_job_id":"66d1aa6a-d1c6-4a62-9cc3-ed343672b044","html_url":"https://github.com/ran-isenberg/aws-lambda-handler-cookbook","commit_stats":null,"previous_names":[],"tags_count":110,"template":true,"template_full_name":null,"purl":"pkg:github/ran-isenberg/aws-lambda-handler-cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ran-isenberg%2Faws-lambda-handler-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ran-isenberg%2Faws-lambda-handler-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ran-isenberg%2Faws-lambda-handler-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ran-isenberg%2Faws-lambda-handler-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ran-isenberg","download_url":"https://codeload.github.com/ran-isenberg/aws-lambda-handler-cookbook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ran-isenberg%2Faws-lambda-handler-cookbook/sbom","scorecard":{"id":1237084,"data":{"date":"2025-09-05T18:00:18Z","repo":{"name":"github.com/ran-isenberg/aws-lambda-handler-cookbook","commit":"7d2bf914116a4a818628f9f26cab389aede938c4"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":7.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Maintained","score":6,"reason":"7 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Pinned-Dependencies","score":9,"reason":"dependency not pinned by hash detected -- score normalized to 9","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/ran-isenberg/aws-lambda-handler-cookbook/codeql-analysis.yml.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/ran-isenberg/aws-lambda-handler-cookbook/codeql-analysis.yml.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml.yml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/ran-isenberg/aws-lambda-handler-cookbook/codeql-analysis.yml.yml/main?enable=pin","Info:  18 out of  21 GitHub-owned GitHubAction dependencies pinned","Info:   7 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml.yml:31","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml.yml:32","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/main-serverless-service.yml:138","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml.yml:15","Info: topLevel 'checks' permission set to 'read': .github/workflows/comment_issues.yml:5","Info: topLevel 'contents' permission set to 'read': .github/workflows/comment_issues.yml:6","Info: topLevel 'contents' permission set to 'read': .github/workflows/main-serverless-service.yml:6","Info: topLevel 'contents' permission set to 'read': .github/workflows/pr-serverless-service.yml:6","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":2,"reason":"badge detected: InProgress","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (29) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: found contributions from: cyberark"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"29 out of 29 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-09-05T19:30:31.634Z","repository_id":37056475,"created_at":"2025-09-05T19:30:31.635Z","updated_at":"2025-09-05T19:30:31.635Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31853282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-lambda","best-practices","blueprint","cdk","cookbook","pipeline","python","serverless","serverless-aws","template","template-repository"],"created_at":"2024-08-01T18:01:34.220Z","updated_at":"2026-04-15T18:04:22.810Z","avatar_url":"https://github.com/ran-isenberg.png","language":"Python","readme":"# AWS Lambda Handler Cookbook (Python)\n\n[![license](https://img.shields.io/github/license/ran-isenberg/aws-lambda-handler-cookbook)](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/master/LICENSE)\n![PythonSupport](https://img.shields.io/static/v1?label=python\u0026message=3.14\u0026color=blue?style=flat-square\u0026logo=python)\n[![codecov](https://codecov.io/github/ran-isenberg/aws-lambda-handler-cookbook/graph/badge.svg?token=P2K7K4KICF)](https://codecov.io/github/ran-isenberg/aws-lambda-handler-cookbook)\n![version](https://img.shields.io/github/v/release/ran-isenberg/aws-lambda-handler-cookbook)\n![github-star-badge](https://img.shields.io/github/stars/ran-isenberg/aws-lambda-handler-cookbook.svg?style=social)\n![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ran-isenberg/aws-lambda-handler-cookbook/badge)\n![issues](https://img.shields.io/github/issues/ran-isenberg/aws-lambda-handler-cookbook)\n\n![alt text](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/main/docs/media/banner.png?raw=true)\n\nThis project provides a working, open source based, AWS Lambda handler skeleton Python code includingx DEPLOYMENT code with CDK and a pipeline.\n\nThis project can serve as a blueprint for new Serverless services - CDK deployment code, pipeline and handler are covered.\n\n**[📜Documentation](https://ran-isenberg.github.io/aws-lambda-handler-cookbook/)** | **[Blogs website](https://ranthebuilder.cloud/)**\n\u003e **Contact details | mailto:ran.isenberg@ranthebuilder.cloud**\n\n[![Twitter Follow](https://img.shields.io/twitter/follow/IsenbergRan?label=Follow\u0026style=social)](https://twitter.com/RanBuilder)\n[![Website](https://img.shields.io/badge/Website-www.ranthebuilder.cloud-blue)](https://ranthebuilder.cloud/)\n\n## AWS Recommendation\n\nThis repository was recommended in an AWS blog post [Best practices for accelerating development with serverless blueprints](https://aws.amazon.com/blogs/infrastructure-and-automation/best-practices-for-accelerating-development-with-serverless-blueprints/)\n\n![aws_article](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/main/docs/media/article.png?raw=true)\n\n## Concepts\n\nI spoke at AWS re:invent 2023 with Heitor Lessa, former Chief Architect of Powertools for AWS Lambda about the concepts I implemented in this project.\n\n[![Watch the video](https://img.youtube.com/vi/52W3Qyg242Y/maxresdefault.jpg)](https://www.youtube.com/watch?v=52W3Qyg242Y)\n\n## Getting Started\n\nYou can start with a clean service out of this blueprint repository without using the 'Template' button on GitHub.\n\nYou can use Cookiecutter.\n\n* Cookiecutter - install with pip/brew ``brew install cookiecutter`` or ``pip install cookiecutter``\n\nThen run:\n\n```bash\ncookiecutter gh:ran-isenberg/cookiecutter-serverless-python\n```\n\nAnswer the questions to select repo name, service name, etc.:\n\n![logo](https://github.com/ran-isenberg/cookiecutter-serverless-python/blob/main/media/howto.png?raw=true)\n\n**That's it, your developer environment has been set! you are ready to deploy the service:**\n\n```bash\ncd {new repo folder}\nuv sync\nmake deploy\n```\n\nMake sure you have [uv](https://docs.astral.sh/uv/) installed.\n\nYou can also run 'make pr' will run all checks, synth, file formatters , unit tests, deploy to AWS and run integration and E2E tests.\n\n## **The Problem**\n\nStarting a Serverless service can be overwhelming. You need to figure out many questions and challenges that have nothing to do with your business domain:\n\n* How to deploy to the cloud? What IAC framework do you choose?\n* How to write a SaaS-oriented CI/CD pipeline? What does it need to contain?\n* How do you handle observability, logging, tracing, metrics?\n* How do you write a Lambda function?\n* How do you handle testing?\n* What makes an AWS Lambda handler resilient, traceable, and easy to maintain? How do you write such a code?\n\n## **The Solution**\n\nThis project aims to reduce cognitive load and answer these questions for you by providing a skeleton Python Serverless service blueprint that implements best practices for AWS Lambda, Serverless CI/CD, and AWS CDK in one blueprint project.\n\n### Serverless Service - The Order service\n\n* This project provides a working orders service where customers can create, get, and delete orders of items.\n\n* The project deploys an API GW with AWS Lambda integrations and stores data in a DynamoDB table:\n    * `POST /api/orders/` - Create a new order\n    * `GET /api/orders/{order_id}` - Get an order by ID\n    * `DELETE /api/orders/{order_id}` - Delete an order by ID\n\n```mermaid\nflowchart LR\n    subgraph AWS[\"AWS Cloud\"]\n        subgraph APIGW[\"API Gateway\"]\n            REST[\"REST API\u003cbr/\u003ePOST /api/orders\u003cbr/\u003eGET /api/orders/{id}\u003cbr/\u003eDELETE /api/orders/{id}\"]\n        end\n\n        subgraph Security[\"Security (Production)\"]\n            WAF[\"WAF WebACL\u003cbr/\u003eAWS Managed Rules\"]\n        end\n\n        subgraph Compute[\"Compute\"]\n            CREATE[\"Create Order\u003cbr/\u003eLambda Function\"]\n            GET[\"Get Order\u003cbr/\u003eLambda Function\"]\n            DELETE[\"Delete Order\u003cbr/\u003eLambda Function\"]\n            LAYER[\"Lambda Layer\u003cbr/\u003eCommon Dependencies\"]\n        end\n\n        subgraph Config[\"Configuration\"]\n            APPCONFIG[\"AppConfig\u003cbr/\u003eFeature Flags\"]\n        end\n\n        subgraph Storage[\"Storage\"]\n            DDB[(\"DynamoDB\u003cbr/\u003eOrders Table\")]\n            IDEMPOTENCY[(\"DynamoDB\u003cbr/\u003eIdempotency Table\")]\n        end\n    end\n\n    CLIENT((Client)) --\u003e WAF\n    WAF --\u003e REST\n    REST --\u003e CREATE\n    REST --\u003e GET\n    REST --\u003e DELETE\n    CREATE --\u003e LAYER\n    GET --\u003e LAYER\n    DELETE --\u003e LAYER\n    CREATE --\u003e APPCONFIG\n    CREATE --\u003e DDB\n    CREATE --\u003e IDEMPOTENCY\n    GET --\u003e DDB\n    DELETE --\u003e DDB\n\n    style CLIENT fill:#f9f,stroke:#333\n    style WAF fill:#ff6b6b,stroke:#333\n    style REST fill:#4ecdc4,stroke:#333\n    style CREATE fill:#ffe66d,stroke:#333\n    style GET fill:#ffe66d,stroke:#333\n    style DELETE fill:#ffe66d,stroke:#333\n    style LAYER fill:#ffe66d,stroke:#333\n    style APPCONFIG fill:#95e1d3,stroke:#333\n    style DDB fill:#4a90d9,stroke:#333\n    style IDEMPOTENCY fill:#4a90d9,stroke:#333\n```\n\n#### **Monitoring Design**\n\n```mermaid\nflowchart TB\n    subgraph Monitoring[\"CloudWatch Monitoring\"]\n        subgraph Dashboards[\"Dashboards\"]\n            HL[\"High-Level Dashboard\u003cbr/\u003eAPI Gateway Metrics\u003cbr/\u003eBusiness KPIs\"]\n            LL[\"Low-Level Dashboard\u003cbr/\u003eLambda Metrics\u003cbr/\u003eDynamoDB Metrics\"]\n        end\n\n        subgraph Alarms[\"CloudWatch Alarms\"]\n            API_ALARM[\"API Gateway Alarms\u003cbr/\u003e5XX Errors, Latency\"]\n            LAMBDA_ALARM[\"Lambda Alarms\u003cbr/\u003eErrors, P90 Latency\"]\n            DDB_ALARM[\"DynamoDB Alarms\u003cbr/\u003eThrottles, Errors\"]\n        end\n    end\n\n    subgraph Notification[\"Notification\"]\n        SNS[\"SNS Topic\u003cbr/\u003eKMS Encrypted\"]\n    end\n\n    subgraph Resources[\"Monitored Resources\"]\n        APIGW[\"API Gateway\"]\n        LAMBDA[\"Lambda Function\"]\n        DDB[\"DynamoDB Tables\"]\n    end\n\n    APIGW --\u003e API_ALARM\n    LAMBDA --\u003e LAMBDA_ALARM\n    DDB --\u003e DDB_ALARM\n\n    API_ALARM --\u003e SNS\n    LAMBDA_ALARM --\u003e SNS\n    DDB_ALARM --\u003e SNS\n\n    API_ALARM --\u003e HL\n    LAMBDA_ALARM --\u003e LL\n    DDB_ALARM --\u003e LL\n\n    style HL fill:#4ecdc4,stroke:#333\n    style LL fill:#4ecdc4,stroke:#333\n    style SNS fill:#ff6b6b,stroke:#333\n    style API_ALARM fill:#ffe66d,stroke:#333\n    style LAMBDA_ALARM fill:#ffe66d,stroke:#333\n    style DDB_ALARM fill:#ffe66d,stroke:#333\n```\n\n### **Features**\n\n* Python Serverless service with a recommended file structure.\n* CDK infrastructure with infrastructure tests and security tests.\n* CI/CD pipelines based on Github actions that deploys to AWS with python linters, complexity checks and style formatters.\n* CI/CD pipeline deploys to dev/staging and production environments with different gates between each environment\n* Automatic GitHub releases with semantic versioning based on conventional commits\n* Automatic PR labeling based on commit message prefixes (feat, fix, docs, chore)\n* Makefile for simple developer experience.\n* The AWS Lambda handler embodies Serverless best practices and has all the bells and whistles for a proper production ready handler.\n* AWS Lambda handler uses [AWS Lambda Powertools](https://docs.powertools.aws.dev/lambda-python/).\n* AWS Lambda handler 3 layer architecture: handler layer, logic layer and data access layer\n* Features flags and configuration based on AWS AppConfig\n* Idempotent API\n* REST API protected by WAF with four AWS managed rules in production deployment\n* CloudWatch dashboards - High level and low level including CloudWatch alarms\n* Unit, infrastructure, security, integration and end to end tests.\n* Automatically generated OpenAPI endpoint: /swagger with Pydantic schemas for both requests and responses\n* CI swagger protection - fails the PR if your swagger JSON file (stored at docs/swagger/openapi.json) is out of date\n* Automated protection against API breaking changes\n\n## CDK Deployment\n\nThe CDK code creates an API GW with paths /api/orders (POST) and /api/orders/{order_id} (GET, DELETE), each backed by a dedicated Lambda function.\n\nThe AWS Lambda handler uses a Lambda layer optimization which takes all the packages under the [packages] section in the Pipfile and downloads them in via a Docker instance.\n\nThis allows you to package any custom dependencies you might have, just add them to the Pipfile under the [packages] section.\n\n## Serverless Best Practices\n\nThe AWS Lambda handler will implement multiple best practice utilities.\n\nEach utility is implemented when a new blog post is published about that utility.\n\nThe utilities cover multiple aspect of a production-ready service, including:\n\n* [Logging](https://ranthebuilder.cloud/blog/aws-lambda-cookbook-elevate-your-handler-s-code-part-1-logging/)\n* [Observability: Monitoring and Tracing](https://ranthebuilder.cloud/blog/aws-lambda-cookbook-elevate-your-handler-s-code-part-2-observability/)\n* [Observability: Business KPIs Metrics](https://ranthebuilder.cloud/blog/aws-lambda-cookbook-elevate-your-handler-s-code-part-3-business-domain-observability/)\n* [Environment Variables](https://ranthebuilder.cloud/blog/aws-lambda-cookbook-environment-variables/)\n* [Input Validation](https://ranthebuilder.cloud/blog/aws-lambda-cookbook-elevate-your-handler-s-code-part-5-input-validation/)\n* [Dynamic Configuration \u0026 feature flags](https://ranthebuilder.cloud/blog/aws-lambda-cookbook-part-6-feature-flags-configuration-best-practices/)\n* [Start Your AWS Serverless Service With Two Clicks](https://ranthebuilder.cloud/blog/aws-lambda-cookbook-part-7-how-to-use-the-aws-lambda-cookbook-github-template-project/)\n* [CDK Best practices](https://ranthebuilder.cloud/blog/aws-cdk-best-practices-from-the-trenches/)\n* [Serverless Monitoring](https://ranthebuilder.cloud/blog/how-to-effortlessly-monitor-serverless-applications-with-cloudwatch-part-one/)\n* [API Idempotency](https://ranthebuilder.cloud/blog/serverless-api-idempotency-with-aws-lambda-powertools-and-cdk/)\n* [Serverless OpenAPI Documentation with AWS Powertools](https://ranthebuilder.cloud/blog/serverless-open-api-documentation-with-aws-powertools/)\n\n## Getting started\n\nHead over to the complete project documentation pages at GitHub pages at [https://ran-isenberg.github.io/aws-lambda-handler-cookbook](https://ran-isenberg.github.io/aws-lambda-handler-cookbook/)\n\n## Code Contributions\n\nCode contributions are welcomed. Read this [guide.](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/main/CONTRIBUTING.md)\n\n## Code of Conduct\n\nRead our code of conduct [here.](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/main/CODE_OF_CONDUCT.md)\n\n## Connect\n\n- Email: ran.isenberg@ranthebuilder.cloud\n- Blog: https://ranthebuilder.cloud/\n- Bluesky: [@ranthebuilder.cloud](https://bsky.app/profile/ranthebuilder.cloud)\n- X:       [@RanBuilder](https://twitter.com/RanBuilder)\n- LinkedIn: https://www.linkedin.com/in/ranbuilder/\n\n## AI-Assisted Development\n\nThis project uses [AI-DLC (AI-Driven Development Life Cycle)](https://github.com/awslabs/aidlc-workflows) for AI-assisted software development. Learn more about AI-DLC in this [blog post](https://ranthebuilder.cloud/blog/ai-driven-sdlc/).\n\nAI-DLC provides a structured, adaptive workflow for:\n\n* **Requirements Analysis** - Intelligent requirements gathering and clarification\n* **Architecture Design** - AI-assisted architectural decisions\n* **Code Generation** - Structured code implementation with best practices\n* **Testing** - Comprehensive test generation and validation\n\nThe AI-DLC workflow artifacts are stored in the `aidlc-docs/` directory.\n\n## Credits\n\n* [AWS Lambda Powertools (Python)](https://github.com/aws-powertools/powertools-lambda-python)\n* [AI-DLC Workflows](https://github.com/awslabs/aidlc-workflows)\n\n## License\n\nThis library is licensed under the MIT License. See the [LICENSE](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/main/LICENSE) file.\n\nCopyright (c) 2026 Ran Isenberg\n","funding_links":["https://github.com/sponsors/ran-isenberg"],"categories":["Projects by main language","best-practices"],"sub_categories":["python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fran-isenberg%2Faws-lambda-handler-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fran-isenberg%2Faws-lambda-handler-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fran-isenberg%2Faws-lambda-handler-cookbook/lists"}