Week 8 Worklog

Week 8 Objectives:

  • Master Serverless Concepts: Deep dive into AWS Lambda theory, event-driven mechanisms, and the importance of Lambda Layers.
  • Explore Generative AI: Gain a theoretical overview of Amazon Bedrock, Foundation Models (FMs), and basic use cases.
  • API Architecture: Understand Amazon API Gateway theory and its critical role in Microservices architecture.
  • Hands-on Lab (Weekend): Successfully build an automated image processing pipeline: Upload to S3 -> Trigger Lambda (w/ Pillow Layer) -> Resize Image -> Save to destination S3 bucket.

Tasks to be carried out this week:

DayTaskStart DateCompletion DateReference Material
1AWS Lambda Core Concepts (Research)
- Execution Model: Studied the Lambda lifecycle (Init, Invoke, Shutdown) and the “Cold Start” phenomenon.
- Resource Model: Understood the relationship between Memory and CPU (higher RAM = proportional CPU power).
- Billing: Researched pricing models: Request count + Compute duration (GB-seconds).
- Concurrency: Differentiated between Reserved Concurrency (guaranteed resources) and Provisioned Concurrency (eliminated cold starts).
27/10/202527/10/2025AWS Lambda Docs
2Amazon Bedrock & GenAI Overview (Research)
- Key Concepts: Explored Foundation Models (Claude, Titan, Stable Diffusion), Tokens, and Inference parameters (Temperature, Top P).
- Bedrock Features: Researched theoretical concepts of Knowledge Bases (RAG) for custom data and Agents for task execution.
- Security: Reviewed Bedrock’s data privacy commitments (customer data is not used to retrain AWS base models).
- Use Cases: Read case studies on text summarization and image generation.
28/10/202528/10/2025Bedrock User Guide
3API Gateway Fundamentals (Research)
- Architecture: Studied the role of API Gateway: Authentication, Throttling, and Caching.
- Types: Compared REST API (Feature-rich) vs. HTTP API (Low-cost/Low-latency) vs. WebSocket API (Real-time).
- Integration: Deep dived into Lambda Proxy Integration (passing the raw event object directly to Lambda).
- Endpoint Types: Differentiated between Edge-optimized (Global), Regional (Region-specific), and Private endpoints (VPC internal).
29/10/202529/10/2025API Gateway Concepts
4S3 Event Notifications & IAM Preparation (Pre-Lab)
- Event Patterns: Investigated S3 Event Notifications mechanism (specifically s3:ObjectCreated:*) to trigger Lambda functions.
- IAM Permissions: Drafted the necessary IAM Policy: Lambda requires s3:GetObject (Source bucket), s3:PutObject (Destination bucket), and logs:CreateLogGroup.
- Library Research: Researched the Pillow (PIL) Python library for image manipulation and the process of packaging it into a Lambda Layer (since it’s not in the standard runtime).
30/10/202530/10/2025S3 Event Notifications
5Lab: Serverless Image Resizer (Implementation)
- Lambda Layer: Created and uploaded a Layer containing the Pillow library (compatible with Python 3.x runtime).
- Coding: Developed the Lambda function (Python/Boto3) to retrieve the image from the S3 event, resize it to a thumbnail (e.g., 128x128), and save it to the target bucket.
- Configuration: Configured S3 Bucket Triggers to automatically invoke the function upon file upload to the /raw folder.
- Testing & Debug: Uploaded test images, verified results in the destination bucket, and analyzed CloudWatch Logs to resolve import/permission errors.
31/10/202501/11/2025Serverless Image Resizing

Week 8 Achievements:

  • Solidified Serverless & AI Theory: Gained a comprehensive understanding of the Serverless ecosystem (Lambda, API Gateway) and Generative AI trends (Bedrock) through deep documentation review.
  • Mastered Lambda Environment: Recognized the critical importance of Lambda Layers when working with external dependencies like Pillow or Pandas, optimizing code efficiency.
  • Implemented Event-Driven Architecture: Successfully built a functional, real-world application: a serverless Image Processing Pipeline.
  • IAM & Debugging Skills: Applied “Least Privilege” principles for Lambda security and utilized CloudWatch Logs effectively for troubleshooting execution errors.