# awsdocs/aws-lambda-developer-guide architecture

> Architecture diagram of the GitHub repository awsdocs/aws-lambda-developer-guide, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/awsdocs/aws-lambda-developer-guide
- Repository: https://github.com/awsdocs/aws-lambda-developer-guide

## Overview

##### Project Type & Purpose
- Recognize that this is not a single application but rather an educational and reference resource. It’s intended to demonstrate best practices and usage scenarios for AWS Lambda.
- The repository separates concerns by organizing sample IAM policies, sample apps, and CloudFormation templates. These illustrate how AWS Lambda functions are built, deployed, and integrated with other AWS services.

##### Main Components
a. IAM Policies:
- That these policies offer pre-defined configurations for different AWS use cases (e.g., EC2 AMI deployments, Elasticsearch, IoT Button integrations, etc.).

b. Sample Applications:
- Blank implementations (C#, Go, Java, Node.js, PowerShell, Python, Ruby)
- More specialized examples (e.g., ec2-spot, efs-nodejs, file-processing-python, etc.)
- That these sample projects generally include deployment scripts (shell scripts for bucket creation, deployment, invocation, and cleanup) and code that defines AWS Lambda functions.

c. CloudFormation Templates:
- That these templates provide ready-made configurations to deploy AWS Lambda functions and VPC network resources (both private and public).

##### Relationships & Interactions
- IAM Policies to both the sample apps and the CloudFormation templates to illustrate that proper permission configurations (via policies) are required when deploying and invoking Lambda functions.
- CloudFormation templates provision AWS Lambda, VPC, and networking components.
- IAM policies secure these components.
- Sample apps (with their coded handlers) run on Lambda and interact with other AWS services via events and triggers.

##### Architectural Patterns & Principles
- A modular design: separate concerns among security (IAM policies), compute logic (Lambda functions in multiple languages), and infrastructure deployment (CloudFormation templates).
- Patterns such as Infrastructure as Code (using CloudFormation) and multi-language support for AWS Lambda functions.

##### Relevant Technologies & Frameworks
- That each sample app uses language-specific tooling (e.g., Maven/Gradle for Java, npm for Node.js, pip/requirements.txt for Python, etc.), so you might place small annotations near each sub-component.
- That the deployment scripts, policy templates, and application code aim to illustrate interactions with AWS’s core serverless offerings.

##### Final Touches
- To include any directional dependency flows that illustrate the lifecycle: from code development (within sample apps) to deployment (via CloudFormation templates) and secure operation (using IAM policies).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Core Modules"
        IAM["IAM Policies – Permissions and Security Blueprints"]:::module
        APPS["Sample Apps – Multi-language AWS Lambda Functions"]:::module
        CFN["CloudFormation Templates – Infrastructure as Code"]:::module
    end

    subgraph "AWS Services"
        LAMBDA["AWS Lambda"]:::aws
        APIGW["API Gateway"]:::aws
        VPC["VPC & Networking"]:::aws
    end

    APPS -->|"deployed_by"| CFN
    IAM -->|"secures"| APPS
    IAM -->|"secures"| CFN
    CFN -->|"provisions"| LAMBDA
    CFN -->|"provisions"| VPC
    APPS -->|"invokes"| LAMBDA
    LAMBDA -->|"triggers"| APIGW

    classDef module fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef aws fill:#87CEFA,stroke:#333,stroke-width:2px;

    click IAM "https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/iam-policies/"
    click APPS "https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/sample-apps/"
    click CFN "https://github.com/awsdocs/aws-lambda-developer-guide/tree/main/templates/"
```
