Serverless Architecture | Sheetly Cheat Sheet

Serverless Architecture | Sheetly reference guide — essential Software Engineering cheat sheet with key concepts, commands, and best practices for quick a.

Last Updated: November 21, 2025

Serverless Architecture

Building serverless applications

Serverless Concepts

Item Description
Function as a Service (FaaS) Run code without servers
Event-driven Functions triggered by events
Auto-scaling Automatic resource scaling
Pay-per-use Only pay for execution time
Stateless Functions don't maintain state

AWS Lambda Function

exports.handler = async (event) => {
    console.log('Event:', JSON.stringify(event));
    
    const body = JSON.parse(event.body);
    
    // Process data
    const result = {
        message: 'Success',
        data: body
    };
    
    return {
        statusCode: 200,
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify(result)
    };
};

Common Triggers

  • API Gateway: HTTP requests
  • S3 Events: File uploads
  • DynamoDB Streams: Database changes
  • SNS/SQS: Message queues
  • CloudWatch Events: Scheduled jobs
  • EventBridge: Custom events

Best Practices

  • Keep functions small and focused
  • Use environment variables for config
  • Implement proper error handling
  • Optimize cold start times
  • Use layers for shared dependencies
  • Monitor with CloudWatch Logs

💡 Pro Tips

Quick Reference

Build scalable serverless applications

← Back to Data Science & ML | Browse all categories | View all cheat sheets