dojo.md 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/courses/GENERATION_LOG.md +45 -0
- package/courses/aws-lambda-debugging/course.yaml +11 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/api-gateway-integration.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/cloudwatch-logs-basics.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/cold-start-basics.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/environment-variable-issues.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/first-debugging-shift.yaml +73 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/handler-import-errors.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/iam-permission-errors.yaml +68 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/invocation-errors.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/lambda-timeout-errors.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/memory-and-oom.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/async-invocation-failures.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/cold-start-optimization.yaml +76 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/dynamodb-streams-debugging.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/lambda-concurrency-management.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/lambda-layers-debugging.yaml +76 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/sam-local-debugging.yaml +74 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/sqs-event-source.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/vpc-networking-issues.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/xray-tracing.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/advanced-debugging-shift.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/container-image-lambda.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/cross-account-invocation.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/eventbridge-patterns.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/iac-deployment-debugging.yaml +68 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/kinesis-stream-processing.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/lambda-at-edge.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/lambda-extensions-debugging.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/powertools-observability.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/step-functions-debugging.yaml +80 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/cost-optimization-strategy.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/expert-debugging-shift.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/incident-management-serverless.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/multi-region-serverless.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/observability-platform-design.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-architecture-design.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-data-architecture.yaml +66 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-migration-strategy.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-security-design.yaml +60 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-testing-strategy.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/board-serverless-strategy.yaml +63 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/consulting-serverless-adoption.yaml +57 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/industry-serverless-patterns.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/ma-serverless-integration.yaml +75 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/master-debugging-shift.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/organizational-serverless-transformation.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/regulatory-serverless.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-economics.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-future-technology.yaml +66 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-platform-design.yaml +71 -0
- package/courses/docker-container-debugging/course.yaml +11 -0
- package/courses/docker-container-debugging/scenarios/level-1/container-exit-codes.yaml +59 -0
- package/courses/docker-container-debugging/scenarios/level-1/container-networking-basics.yaml +69 -0
- package/courses/docker-container-debugging/scenarios/level-1/docker-logs-debugging.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-1/dockerfile-build-failures.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-1/environment-variable-issues.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-1/first-debugging-shift.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-1/image-pull-failures.yaml +68 -0
- package/courses/docker-container-debugging/scenarios/level-1/port-mapping-issues.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-1/resource-limits-oom.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-1/volume-mount-problems.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-2/container-health-checks.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-2/docker-compose-debugging.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-2/docker-exec-debugging.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-2/image-layer-optimization.yaml +81 -0
- package/courses/docker-container-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-2/logging-and-log-rotation.yaml +76 -0
- package/courses/docker-container-debugging/scenarios/level-2/multi-stage-build-debugging.yaml +76 -0
- package/courses/docker-container-debugging/scenarios/level-2/network-debugging-tools.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-2/pid1-signal-handling.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-2/security-scanning-basics.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-3/advanced-debugging-shift.yaml +77 -0
- package/courses/docker-container-debugging/scenarios/level-3/buildkit-optimization.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-3/container-filesystem-debugging.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-3/container-security-hardening.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-3/disk-space-management.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-api-automation.yaml +72 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-daemon-issues.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-in-docker-ci.yaml +69 -0
- package/courses/docker-container-debugging/scenarios/level-3/overlay-network-debugging.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-3/production-container-ops.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-4/cicd-pipeline-design.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-monitoring-observability.yaml +63 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-orchestration-strategy.yaml +62 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-performance-engineering.yaml +64 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-security-architecture.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-4/enterprise-image-management.yaml +58 -0
- package/courses/docker-container-debugging/scenarios/level-4/expert-debugging-shift.yaml +63 -0
- package/courses/docker-container-debugging/scenarios/level-4/incident-response-containers.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-4/multi-environment-management.yaml +65 -0
- package/courses/docker-container-debugging/scenarios/level-4/stateful-service-containers.yaml +65 -0
- package/courses/docker-container-debugging/scenarios/level-5/board-infrastructure-strategy.yaml +58 -0
- package/courses/docker-container-debugging/scenarios/level-5/consulting-container-strategy.yaml +61 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-platform-architecture.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-platform-economics.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-technology-evolution.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/disaster-recovery-containers.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-5/industry-container-patterns.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-5/master-debugging-shift.yaml +62 -0
- package/courses/docker-container-debugging/scenarios/level-5/organizational-transformation.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/regulatory-compliance-containers.yaml +61 -0
- package/courses/kubernetes-deployment-troubleshooting/course.yaml +12 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/configmap-secret-issues.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/crashloopbackoff.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/deployment-rollout.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/first-troubleshooting-shift.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/health-probe-failures.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/imagepullbackoff.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/kubectl-debugging-basics.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/oomkilled.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/pending-pods.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/service-not-reachable.yaml +66 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/dns-resolution-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/helm-deployment-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/hpa-scaling-issues.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/ingress-routing-issues.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/init-container-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/intermediate-troubleshooting-shift.yaml +66 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/network-policy-blocking.yaml +67 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/persistent-volume-issues.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/rbac-permission-denied.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/resource-quota-limits.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/advanced-troubleshooting-shift.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/cluster-upgrade-failures.yaml +71 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/gitops-drift-detection.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/job-cronjob-failures.yaml +67 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/monitoring-alerting-gaps.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/multi-container-debugging.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/node-pressure-evictions.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/pod-disruption-budgets.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/service-mesh-debugging.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/statefulset-troubleshooting.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/capacity-planning.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/cost-optimization.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/disaster-recovery-design.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/executive-communication.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/expert-troubleshooting-shift.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/incident-management-process.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-cluster-operations.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-tenancy-design.yaml +55 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/platform-engineering.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/security-hardening.yaml +58 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/behavioral-science.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/board-strategy.yaml +61 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/cloud-native-future.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/comprehensive-platform.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/consulting-engagement.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/industry-benchmarks.yaml +58 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/ma-integration.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/master-troubleshooting-shift.yaml +73 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/product-development.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/regulatory-compliance.yaml +76 -0
- package/courses/mysql-query-optimization/course.yaml +11 -0
- package/courses/mysql-query-optimization/scenarios/level-1/buffer-pool-basics.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-1/explain-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +78 -0
- package/courses/mysql-query-optimization/scenarios/level-1/innodb-index-fundamentals.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-1/join-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/select-star-problems.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-2/buffer-pool-tuning.yaml +64 -0
- package/courses/mysql-query-optimization/scenarios/level-2/composite-index-design.yaml +71 -0
- package/courses/mysql-query-optimization/scenarios/level-2/covering-and-invisible-indexes.yaml +69 -0
- package/courses/mysql-query-optimization/scenarios/level-2/cte-and-window-functions.yaml +78 -0
- package/courses/mysql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-2/join-optimization.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-2/performance-schema-analysis.yaml +69 -0
- package/courses/mysql-query-optimization/scenarios/level-2/query-optimizer-hints.yaml +74 -0
- package/courses/mysql-query-optimization/scenarios/level-2/subquery-optimization.yaml +70 -0
- package/courses/mysql-query-optimization/scenarios/level-2/write-optimization.yaml +63 -0
- package/courses/mysql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
- package/courses/mysql-query-optimization/scenarios/level-3/connection-management.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-3/full-text-search.yaml +77 -0
- package/courses/mysql-query-optimization/scenarios/level-3/json-optimization.yaml +87 -0
- package/courses/mysql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-3/monitoring-alerting.yaml +63 -0
- package/courses/mysql-query-optimization/scenarios/level-3/online-schema-changes.yaml +79 -0
- package/courses/mysql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +83 -0
- package/courses/mysql-query-optimization/scenarios/level-3/query-profiling-deep-dive.yaml +84 -0
- package/courses/mysql-query-optimization/scenarios/level-3/replication-optimization.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-4/aurora-vs-rds-evaluation.yaml +61 -0
- package/courses/mysql-query-optimization/scenarios/level-4/data-architecture.yaml +62 -0
- package/courses/mysql-query-optimization/scenarios/level-4/database-migration-planning.yaml +59 -0
- package/courses/mysql-query-optimization/scenarios/level-4/enterprise-governance.yaml +50 -0
- package/courses/mysql-query-optimization/scenarios/level-4/executive-communication.yaml +54 -0
- package/courses/mysql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +60 -0
- package/courses/mysql-query-optimization/scenarios/level-4/optimizer-internals.yaml +62 -0
- package/courses/mysql-query-optimization/scenarios/level-4/performance-sla-design.yaml +52 -0
- package/courses/mysql-query-optimization/scenarios/level-4/read-replica-scaling.yaml +51 -0
- package/courses/mysql-query-optimization/scenarios/level-5/ai-database-future.yaml +45 -0
- package/courses/mysql-query-optimization/scenarios/level-5/behavioral-science.yaml +44 -0
- package/courses/mysql-query-optimization/scenarios/level-5/benchmark-design.yaml +47 -0
- package/courses/mysql-query-optimization/scenarios/level-5/board-strategy.yaml +48 -0
- package/courses/mysql-query-optimization/scenarios/level-5/comprehensive-platform.yaml +49 -0
- package/courses/mysql-query-optimization/scenarios/level-5/consulting-engagement.yaml +52 -0
- package/courses/mysql-query-optimization/scenarios/level-5/ma-database-integration.yaml +47 -0
- package/courses/mysql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +56 -0
- package/courses/mysql-query-optimization/scenarios/level-5/product-development.yaml +48 -0
- package/courses/mysql-query-optimization/scenarios/level-5/regulatory-compliance.yaml +48 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/comprehensive-database-system.yaml +70 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-ai-future.yaml +81 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-behavioral-science.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-board-strategy.yaml +77 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-consulting-engagement.yaml +61 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-industry-benchmarks.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-ma-integration.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-product-development.yaml +72 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-regulatory-landscape.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +66 -0
- package/courses/terraform-infrastructure-setup/course.yaml +11 -0
- package/courses/terraform-infrastructure-setup/scenarios/level-1/terraform-init-errors.yaml +72 -0
- package/dist/mcp/session-manager.d.ts +7 -4
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +23 -8
- package/dist/mcp/session-manager.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: sam-local-debugging
|
|
3
|
+
level: 2
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda locally with SAM CLI — use sam local invoke, start-api, and generate-event for local development and testing"
|
|
7
|
+
tags: [AWS, Lambda, SAM, local-testing, debugging, development, intermediate]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your development workflow is painful: make a change, deploy to AWS
|
|
13
|
+
(2 minutes), test, see error, repeat. You need local debugging.
|
|
14
|
+
|
|
15
|
+
Setting up SAM CLI:
|
|
16
|
+
|
|
17
|
+
$ sam init --runtime python3.12 --app-template hello-world
|
|
18
|
+
$ sam build
|
|
19
|
+
$ sam local invoke HelloWorldFunction
|
|
20
|
+
Invoking app.lambda_handler (python3.12)
|
|
21
|
+
Building image...
|
|
22
|
+
START RequestId: local-123
|
|
23
|
+
{"statusCode": 200, "body": "{\"message\": \"hello world\"}"}
|
|
24
|
+
END RequestId: local-123
|
|
25
|
+
REPORT RequestId: local-123 Duration: 5.23 ms
|
|
26
|
+
|
|
27
|
+
Works! But now testing with a real event:
|
|
28
|
+
|
|
29
|
+
$ sam local generate-event apigateway aws-proxy > event.json
|
|
30
|
+
$ sam local invoke HelloWorldFunction -e event.json
|
|
31
|
+
Error: Template file not found: template.yaml
|
|
32
|
+
|
|
33
|
+
Wrong directory — SAM needs template.yaml (infrastructure definition).
|
|
34
|
+
|
|
35
|
+
Testing API locally:
|
|
36
|
+
$ sam local start-api
|
|
37
|
+
Mounting HelloWorldFunction at http://127.0.0.1:3000/hello [GET]
|
|
38
|
+
$ curl http://localhost:3000/hello
|
|
39
|
+
{"message": "hello world"}
|
|
40
|
+
|
|
41
|
+
But environment variables are missing:
|
|
42
|
+
$ sam local invoke -n env.json HelloWorldFunction
|
|
43
|
+
# env.json: {"HelloWorldFunction": {"TABLE_NAME": "local-table"}}
|
|
44
|
+
|
|
45
|
+
Debugging with breakpoints:
|
|
46
|
+
$ sam local invoke -d 5858 HelloWorldFunction
|
|
47
|
+
Debugger listening on ws://127.0.0.1:5858
|
|
48
|
+
(attach VS Code debugger to port 5858)
|
|
49
|
+
|
|
50
|
+
Limitations:
|
|
51
|
+
- Local execution uses Docker — slightly different from actual Lambda
|
|
52
|
+
- IAM permissions not enforced locally
|
|
53
|
+
- VPC networking not simulated
|
|
54
|
+
- Event source mappings not simulated (must provide events manually)
|
|
55
|
+
|
|
56
|
+
Task: Explain SAM CLI local debugging. Write: sam local invoke
|
|
57
|
+
(function testing), sam local start-api (API testing), generating
|
|
58
|
+
test events, environment variables and configuration, debugging
|
|
59
|
+
with breakpoints (VS Code), limitations of local testing, and
|
|
60
|
+
complementary tools (LocalStack, moto for AWS mocking).
|
|
61
|
+
|
|
62
|
+
assertions:
|
|
63
|
+
- type: llm_judge
|
|
64
|
+
criteria: "SAM local commands are explained — sam local invoke: runs function once with optional event file (-e event.json). sam local start-api: starts local HTTP server that routes to Lambda functions (mirrors API Gateway). sam local start-lambda: starts local Lambda endpoint for SDK testing. sam local generate-event: creates sample events for various triggers (apigateway, s3, sqs, dynamodb, etc.). sam build: compiles/packages code before local testing. All require Docker running locally"
|
|
65
|
+
weight: 0.35
|
|
66
|
+
description: "SAM commands"
|
|
67
|
+
- type: llm_judge
|
|
68
|
+
criteria: "Debugging and configuration are covered — breakpoint debugging: sam local invoke -d <port> pauses function until debugger attaches. VS Code: launch.json configuration for SAM debugging. Environment variables: -n env.json file or --parameter-overrides. Docker network: --docker-network to connect Lambda to local services (local DynamoDB, PostgreSQL). Hot reloading: --skip-pull-image for faster iteration. Layer testing: layers specified in template.yaml are automatically included in local invocations"
|
|
69
|
+
weight: 0.35
|
|
70
|
+
description: "Debugging"
|
|
71
|
+
- type: llm_judge
|
|
72
|
+
criteria: "Limitations and alternatives are practical — SAM local limitations: no IAM enforcement (permission errors won't appear), no VPC simulation, no event source mapping simulation, Docker-based execution has slight differences from real Lambda. Alternatives: LocalStack (full AWS service emulation), moto (Python AWS mocking), DynamoDB Local (official local DynamoDB). Best practice: local testing for rapid development iteration, deploy to a dev AWS account for integration testing, use CI/CD for automated testing against real services. Unit tests mock AWS SDK calls for fast feedback"
|
|
73
|
+
weight: 0.30
|
|
74
|
+
description: "Limitations"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: sqs-event-source
|
|
3
|
+
level: 2
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda SQS event source mapping — diagnose message processing failures, batch errors, visibility timeout issues, and dead-letter queue configuration"
|
|
7
|
+
tags: [AWS, Lambda, SQS, event-source-mapping, DLQ, batch, intermediate]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function processes SQS messages but messages keep
|
|
13
|
+
reappearing in the queue and eventually go to the DLQ:
|
|
14
|
+
|
|
15
|
+
$ aws sqs get-queue-attributes --queue-url $QUEUE_URL \
|
|
16
|
+
--attribute-names ApproximateNumberOfMessages \
|
|
17
|
+
ApproximateNumberOfMessagesNotVisible
|
|
18
|
+
{
|
|
19
|
+
"ApproximateNumberOfMessages": "0",
|
|
20
|
+
"ApproximateNumberOfMessagesNotVisible": "150"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
150 messages are "in flight" (not visible) — they're being
|
|
24
|
+
processed but not being deleted.
|
|
25
|
+
|
|
26
|
+
CloudWatch Logs:
|
|
27
|
+
Processing batch of 10 messages...
|
|
28
|
+
Error processing message 7: Invalid JSON in message body
|
|
29
|
+
ERROR: Unhandled exception
|
|
30
|
+
|
|
31
|
+
The problem: when ANY message in a batch fails, Lambda reports the
|
|
32
|
+
entire batch as failed. All 10 messages return to the queue, even
|
|
33
|
+
the 9 that processed successfully. This causes:
|
|
34
|
+
- Successfully processed messages are processed again (duplicates!)
|
|
35
|
+
- The bad message keeps failing, blocking the batch
|
|
36
|
+
- After maxReceiveCount (e.g., 3), ALL messages go to DLQ
|
|
37
|
+
|
|
38
|
+
Fix — Partial batch failure reporting:
|
|
39
|
+
Return failed message IDs in the response:
|
|
40
|
+
{
|
|
41
|
+
"batchItemFailures": [
|
|
42
|
+
{ "itemIdentifier": "message-id-7" }
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
Enable ReportBatchItemFailures in the event source mapping.
|
|
47
|
+
Now only message 7 retries; messages 1-6 and 8-10 are deleted.
|
|
48
|
+
|
|
49
|
+
Another issue — visibility timeout:
|
|
50
|
+
If Lambda takes longer to process than the queue's visibility
|
|
51
|
+
timeout (default 30s), the message becomes visible again and
|
|
52
|
+
another Lambda instance picks it up → duplicate processing.
|
|
53
|
+
Rule: visibility timeout should be 6x the Lambda timeout.
|
|
54
|
+
|
|
55
|
+
Task: Explain SQS + Lambda debugging. Write: how event source
|
|
56
|
+
mapping works (polling, batching), batch failure handling (partial
|
|
57
|
+
vs full), visibility timeout tuning, DLQ configuration, message
|
|
58
|
+
deduplication, and common SQS + Lambda anti-patterns.
|
|
59
|
+
|
|
60
|
+
assertions:
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Event source mapping mechanics are explained — Lambda polls SQS queue automatically (long polling). Messages delivered in batches (configurable: 1-10 for standard, 1-10000 for FIFO). Lambda deletes messages automatically on successful processing. If function fails or times out, messages return to queue after visibility timeout. Batch window: collect messages for up to 5 minutes before invoking. FIFO queues: messages processed in order within message group, concurrency limited by number of active message groups"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "Event source mapping"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Batch failure and DLQ are covered — default: entire batch fails if function returns error. With ReportBatchItemFailures: return batchItemFailures array with failed message IDs — only those retry. Without this, one bad message blocks entire batch. DLQ: messages exceeding maxReceiveCount sent to DLQ. Configure DLQ on the source queue (not the Lambda). DLQ inspection: replay messages after fix. Lambda Destinations: alternative to DLQ, provides more context (function response, error details). Idempotency: design functions to handle duplicate processing safely"
|
|
67
|
+
weight: 0.35
|
|
68
|
+
description: "Batch failure and DLQ"
|
|
69
|
+
- type: llm_judge
|
|
70
|
+
criteria: "Visibility timeout and anti-patterns are practical — set visibility timeout to at least 6x Lambda function timeout. If Lambda timeout = 60s, visibility timeout ≥ 360s. Otherwise: message reappears while still being processed → duplicate processing. Anti-patterns: not handling partial failures (entire batch retries), not implementing idempotency (duplicate processing causes bugs), processing too long for visibility timeout, no DLQ (messages retry forever), not monitoring ApproximateAgeOfOldestMessage (indicates processing lag)"
|
|
71
|
+
weight: 0.30
|
|
72
|
+
description: "Timeout and anti-patterns"
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: vpc-networking-issues
|
|
3
|
+
level: 2
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda VPC networking issues — diagnose ENI provisioning failures, NAT Gateway requirements, and VPC endpoint configuration"
|
|
7
|
+
tags: [AWS, Lambda, VPC, networking, NAT-Gateway, endpoints, intermediate]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function was recently moved into a VPC to access an
|
|
13
|
+
RDS database. Now it can reach the database but can't reach any
|
|
14
|
+
AWS services or external APIs:
|
|
15
|
+
|
|
16
|
+
$ aws lambda invoke --function-name order-api output.json
|
|
17
|
+
{
|
|
18
|
+
"errorType": "TimeoutError",
|
|
19
|
+
"errorMessage": "connect ETIMEDOUT 52.119.225.0:443"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
The function tries to call DynamoDB and S3, but these are public
|
|
23
|
+
AWS endpoints. A Lambda in a VPC private subnet has NO internet
|
|
24
|
+
access by default.
|
|
25
|
+
|
|
26
|
+
Network architecture:
|
|
27
|
+
|
|
28
|
+
Before VPC: Lambda → Internet → AWS Services (S3, DynamoDB) ✓
|
|
29
|
+
After VPC (private subnet, no NAT): Lambda → VPC → ??? → No route
|
|
30
|
+
|
|
31
|
+
Solutions:
|
|
32
|
+
|
|
33
|
+
Option A — NAT Gateway ($32/month + data processing):
|
|
34
|
+
Private subnet → route to NAT Gateway in public subnet → Internet
|
|
35
|
+
Gateway → Internet → AWS services.
|
|
36
|
+
Adds internet access but costs money and adds latency.
|
|
37
|
+
|
|
38
|
+
Option B — VPC Endpoints (recommended for AWS services):
|
|
39
|
+
Gateway endpoints (free): S3, DynamoDB
|
|
40
|
+
Interface endpoints ($7.20/month each): Secrets Manager, SQS,
|
|
41
|
+
SNS, KMS, and 100+ other services.
|
|
42
|
+
Traffic stays within AWS network. No internet required.
|
|
43
|
+
|
|
44
|
+
Another issue discovered:
|
|
45
|
+
ENILimitReachedException — Lambda creates Elastic Network Interfaces
|
|
46
|
+
(ENIs) in your VPC subnets. If the subnet runs out of available
|
|
47
|
+
IPs or you hit the ENI quota, new Lambda instances can't start.
|
|
48
|
+
|
|
49
|
+
$ aws ec2 describe-network-interfaces \
|
|
50
|
+
--filters Name=requester-id,Values=*lambda*
|
|
51
|
+
(showing 250 ENIs — hitting the limit)
|
|
52
|
+
|
|
53
|
+
Task: Explain Lambda VPC networking. Write: why VPC Lambda loses
|
|
54
|
+
internet access, NAT Gateway vs VPC endpoints (cost, performance),
|
|
55
|
+
ENI management (Hyperplane ENIs, subnet sizing, IP exhaustion),
|
|
56
|
+
security group configuration for Lambda, and when to (and not to)
|
|
57
|
+
put Lambda in a VPC.
|
|
58
|
+
|
|
59
|
+
assertions:
|
|
60
|
+
- type: llm_judge
|
|
61
|
+
criteria: "VPC networking problem is explained — Lambda in VPC gets a network interface in your subnet but private subnets have no internet route. Two solutions: NAT Gateway (routes through internet — needed for external APIs, costs ~$32/month + data charges) or VPC Endpoints (direct AWS service access without internet — Gateway endpoints for S3/DynamoDB are free, Interface endpoints cost $7.20/month each). Best practice: use VPC endpoints for AWS services, NAT Gateway only for external API access. VPC adds cold start latency (ENI attachment)"
|
|
62
|
+
weight: 0.35
|
|
63
|
+
description: "VPC networking"
|
|
64
|
+
- type: llm_judge
|
|
65
|
+
criteria: "ENI and subnet management are covered — Lambda uses Hyperplane ENIs (shared across functions with same subnet + security group). ENI limit: default 250 per VPC (request increase). Subnet sizing: /24 gives ~251 usable IPs, adequate for most. Multiple subnets across AZs for availability. Security groups: Lambda needs outbound rules to reach databases/services. Inbound rules typically not needed (Lambda initiates connections). Check: aws ec2 describe-network-interfaces to see Lambda ENIs"
|
|
66
|
+
weight: 0.35
|
|
67
|
+
description: "ENI and subnet"
|
|
68
|
+
- type: llm_judge
|
|
69
|
+
criteria: "When to use VPC is practical — put Lambda in VPC ONLY when it needs to access VPC resources (RDS, ElastiCache, EC2 instances). Don't use VPC if Lambda only accesses public AWS services (S3, DynamoDB, SQS) — VPC adds complexity, cost, and cold start latency without benefit. If you need both VPC resources AND internet: use VPC endpoints for AWS services + NAT Gateway for external. IAM role needs AWSLambdaVPCAccessExecutionRole for ENI management permissions. Consider RDS Proxy for database connection pooling in VPC"
|
|
70
|
+
weight: 0.30
|
|
71
|
+
description: "When to use VPC"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: xray-tracing
|
|
3
|
+
level: 2
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda with X-Ray tracing — implement distributed tracing to identify performance bottlenecks across multiple services"
|
|
7
|
+
tags: [AWS, Lambda, X-Ray, tracing, distributed, performance, intermediate]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your API has intermittent slow responses. CloudWatch shows p99
|
|
13
|
+
latency of 4.5 seconds but p50 is 200ms. You need to find what
|
|
14
|
+
causes the occasional slowness. CloudWatch Logs alone can't tell
|
|
15
|
+
you which downstream call is slow.
|
|
16
|
+
|
|
17
|
+
Enable X-Ray tracing:
|
|
18
|
+
$ aws lambda update-function-configuration \
|
|
19
|
+
--function-name order-api \
|
|
20
|
+
--tracing-config Mode=Active
|
|
21
|
+
|
|
22
|
+
After enabling X-Ray, the service map shows:
|
|
23
|
+
API Gateway → order-api (Lambda) → DynamoDB (getItem)
|
|
24
|
+
→ payment-service (Lambda)
|
|
25
|
+
→ SES (sendEmail)
|
|
26
|
+
|
|
27
|
+
X-Ray trace for a slow request (4.2s total):
|
|
28
|
+
├─ Lambda Init: 450ms (cold start)
|
|
29
|
+
├─ DynamoDB getItem: 15ms
|
|
30
|
+
├─ payment-service invoke: 3,500ms ← BOTTLENECK
|
|
31
|
+
│ └─ payment-service Lambda:
|
|
32
|
+
│ ├─ Stripe API call: 3,200ms ← ROOT CAUSE
|
|
33
|
+
│ └─ DynamoDB putItem: 50ms
|
|
34
|
+
└─ SES sendEmail: 180ms
|
|
35
|
+
|
|
36
|
+
X-Ray reveals: the payment-service makes a synchronous call to
|
|
37
|
+
Stripe's API that occasionally takes 3+ seconds (Stripe rate
|
|
38
|
+
limiting or connectivity issue).
|
|
39
|
+
|
|
40
|
+
Fix: Make the payment processing asynchronous — invoke payment-
|
|
41
|
+
service with InvocationType=Event, confirm the order immediately,
|
|
42
|
+
process payment in the background.
|
|
43
|
+
|
|
44
|
+
Task: Explain X-Ray tracing for Lambda. Write: how to enable and
|
|
45
|
+
configure X-Ray, reading service maps and traces, adding custom
|
|
46
|
+
subsegments for detailed breakdown, correlating X-Ray traces with
|
|
47
|
+
CloudWatch Logs (trace ID), common performance patterns revealed
|
|
48
|
+
by tracing, and the cost of X-Ray tracing.
|
|
49
|
+
|
|
50
|
+
assertions:
|
|
51
|
+
- type: llm_judge
|
|
52
|
+
criteria: "X-Ray setup and traces are explained — enable: set tracing mode to Active on Lambda function. Lambda execution role needs xray:PutTraceSegments and xray:PutTelemetryRecords. Service map: visual representation of all services and their connections. Traces: timeline view of a single request showing each segment (service call) with duration. Subsegments: detailed breakdown within a segment (database queries, HTTP calls). X-Amzn-Trace-Id header propagates trace context across services automatically"
|
|
53
|
+
weight: 0.35
|
|
54
|
+
description: "X-Ray setup"
|
|
55
|
+
- type: llm_judge
|
|
56
|
+
criteria: "Reading traces and debugging are covered — trace view shows: total duration, each service call's duration, errors/faults at each step. Identify bottleneck: longest segment in the trace. Annotations: key-value pairs for filtering traces (e.g., userId, orderId). Metadata: additional data not indexed. Custom subsegments: wrap code blocks to track internal operations (e.g., database query, API call, data processing). AWS SDK calls automatically create subsegments. Correlate with CloudWatch Logs: trace ID appears in both for cross-reference"
|
|
57
|
+
weight: 0.35
|
|
58
|
+
description: "Reading traces"
|
|
59
|
+
- type: llm_judge
|
|
60
|
+
criteria: "Patterns and cost are practical — common patterns: cold start visible as Init segment, slow external API calls, N+1 query patterns (many small DB calls), synchronous chains (each service waits for the next). Solutions: async invocation for non-critical work, caching for repeated lookups, connection reuse. X-Ray cost: $5 per million traces recorded, $0.50 per million traces retrieved. First 100K traces/month free. Sampling: X-Ray samples 1 request/second + 5% of additional requests by default. Custom sampling rules to control cost"
|
|
61
|
+
weight: 0.30
|
|
62
|
+
description: "Patterns and cost"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: advanced-debugging-shift
|
|
3
|
+
level: 3
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Combined advanced debugging shift — diagnose a complex serverless architecture with Step Functions, EventBridge, cross-account, and observability issues simultaneously"
|
|
7
|
+
tags: [AWS, Lambda, troubleshooting, combined, shift-simulation, advanced]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You're the on-call engineer for a serverless e-commerce platform.
|
|
13
|
+
The PagerDuty alert fires at 2 AM: "Order completion rate dropped
|
|
14
|
+
from 98% to 72%."
|
|
15
|
+
|
|
16
|
+
Architecture:
|
|
17
|
+
API Gateway → order-api (Lambda)
|
|
18
|
+
→ EventBridge (OrderCreated event)
|
|
19
|
+
→ Step Functions workflow:
|
|
20
|
+
ValidateOrder → CheckInventory → ProcessPayment →
|
|
21
|
+
FulfillOrder → NotifyCustomer
|
|
22
|
+
→ DynamoDB Streams → sync-to-analytics (Lambda, cross-account)
|
|
23
|
+
|
|
24
|
+
Investigation reveals 5 interconnected issues:
|
|
25
|
+
|
|
26
|
+
1. Step Functions: ProcessPayment fails for ~28% of orders.
|
|
27
|
+
The payment Lambda throws PaymentGatewayError but the Retry
|
|
28
|
+
config has MaxAttempts: 3 with BackoffRate: 10.0 — retries
|
|
29
|
+
at 5s, 50s, 500s. The total retry time exceeds the Step
|
|
30
|
+
Functions execution timeout of 60 seconds. Execution times out
|
|
31
|
+
during the third retry.
|
|
32
|
+
|
|
33
|
+
2. EventBridge: A new event pattern was deployed that's too
|
|
34
|
+
restrictive. OrderCreated events with amount > $1000 require
|
|
35
|
+
a "highValue" field that doesn't exist yet in the event
|
|
36
|
+
schema. These orders silently drop — no DLQ configured on
|
|
37
|
+
the rule.
|
|
38
|
+
|
|
39
|
+
3. Lambda@Edge: An A/B test function on CloudFront is throwing
|
|
40
|
+
errors for 5% of requests. The logs are scattered across
|
|
41
|
+
multiple regions. The function exceeds the 5-second viewer
|
|
42
|
+
request timeout during cold starts.
|
|
43
|
+
|
|
44
|
+
4. Cross-account sync: The analytics Lambda in the data account
|
|
45
|
+
stopped receiving DynamoDB Stream events. The event source
|
|
46
|
+
mapping shows "PROBLEM: Function call failed." The Lambda's
|
|
47
|
+
IAM role lost cross-account DynamoDB Stream permissions after
|
|
48
|
+
a recent IAM policy cleanup.
|
|
49
|
+
|
|
50
|
+
5. Observability gap: none of these issues triggered alerts.
|
|
51
|
+
CloudWatch alarms exist for Lambda Errors but not for Step
|
|
52
|
+
Functions failures, EventBridge delivery failures, or business
|
|
53
|
+
metrics (order completion rate).
|
|
54
|
+
|
|
55
|
+
Task: Walk through the complete incident response. Write: the
|
|
56
|
+
triage approach (business impact first), fix for each issue,
|
|
57
|
+
the monitoring gaps that allowed silent failures, and the
|
|
58
|
+
post-incident improvements to prevent recurrence.
|
|
59
|
+
|
|
60
|
+
assertions:
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "All five issues are diagnosed — (1) Step Functions: reduce BackoffRate from 10 to 2, or increase execution timeout, or set MaxAttempts to 2. (2) EventBridge: fix pattern to not require 'highValue' field, add DLQ to EventBridge rule. (3) Lambda@Edge: reduce package size for faster cold starts, or move to origin request (30s timeout), check logs in execution regions. (4) Cross-account: restore IAM permissions for DynamoDB Stream access, configure MaximumRetryAttempts and failure destination. (5) Add alerts for Step Functions failures, EventBridge FailedInvocations, business metric (order completion rate)"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "All issues diagnosed"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Triage approach is business-focused — start with business impact: which orders are failing? (28% failure rate). Identify the data flow: API → EventBridge → Step Functions → completion. Check each step for errors. Step Functions execution history shows exactly which state failed. EventBridge: check FailedInvocations and InvocationsCreatedByRule metrics. For Lambda@Edge: check CloudFront error rate metric (4xx/5xx). Priority: fix Step Functions first (directly causing 28% failure), then EventBridge, then Lambda@Edge, then cross-account sync"
|
|
67
|
+
weight: 0.35
|
|
68
|
+
description: "Triage approach"
|
|
69
|
+
- type: llm_judge
|
|
70
|
+
criteria: "Post-incident improvements are comprehensive — monitoring gaps: alert on Step Functions ExecutionsFailed, EventBridge FailedInvocations, and business metrics (order completion rate is the most important metric, not Lambda errors). Add DLQ/destination to every async integration. Add observability: end-to-end tracing with X-Ray across all services, business metric dashboards, SLO definition (order completion rate > 99%). Process improvements: require DLQ configuration in IaC reviews, test event patterns with EventBridge sandbox before deploying, document cross-account dependencies, run chaos engineering to discover silent failures"
|
|
71
|
+
weight: 0.30
|
|
72
|
+
description: "Post-incident improvements"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: container-image-lambda
|
|
3
|
+
level: 3
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda container image deployments — diagnose ECR issues, runtime interface client errors, and container-based Lambda configuration problems"
|
|
7
|
+
tags: [AWS, Lambda, container-image, ECR, Docker, runtime-interface, advanced]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your team migrated a Lambda function from zip deployment to
|
|
13
|
+
container image for larger dependency support. The function fails:
|
|
14
|
+
|
|
15
|
+
$ aws lambda invoke --function-name ml-model output.json
|
|
16
|
+
{
|
|
17
|
+
"errorType": "Runtime.ExitError",
|
|
18
|
+
"errorMessage": "RequestId: abc-123 Error: Runtime exited
|
|
19
|
+
without providing a response"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
The Dockerfile:
|
|
23
|
+
FROM python:3.12-slim
|
|
24
|
+
COPY requirements.txt .
|
|
25
|
+
RUN pip install -r requirements.txt
|
|
26
|
+
COPY app/ /app/
|
|
27
|
+
WORKDIR /app
|
|
28
|
+
CMD ["python", "handler.py"]
|
|
29
|
+
|
|
30
|
+
Problem 1: Missing Lambda Runtime Interface Client (RIC).
|
|
31
|
+
Container image Lambda requires the AWS Lambda Runtime Interface
|
|
32
|
+
Client to communicate with the Lambda service:
|
|
33
|
+
|
|
34
|
+
FROM python:3.12-slim
|
|
35
|
+
RUN pip install awslambdaric
|
|
36
|
+
COPY app/ /app/
|
|
37
|
+
WORKDIR /app
|
|
38
|
+
ENTRYPOINT ["python", "-m", "awslambdaric"]
|
|
39
|
+
CMD ["handler.lambda_handler"]
|
|
40
|
+
|
|
41
|
+
Or use the AWS-provided base image (includes RIC):
|
|
42
|
+
FROM public.ecr.aws/lambda/python:3.12
|
|
43
|
+
|
|
44
|
+
Problem 2: Image in ECR but Lambda can't pull it:
|
|
45
|
+
"ImageNotFoundException: The image with imageId ... does not exist"
|
|
46
|
+
ECR image URI must match exactly: account.dkr.ecr.region.amazonaws.com/
|
|
47
|
+
repo:tag. Digest-based reference is more reliable than tags.
|
|
48
|
+
|
|
49
|
+
Problem 3: Cold start is 15+ seconds.
|
|
50
|
+
Container image: 2.5GB (ML model + dependencies). Lambda must
|
|
51
|
+
download and extract the entire image on cold start.
|
|
52
|
+
Fix: use multi-stage build, strip unnecessary files, consider
|
|
53
|
+
Lambda SnapStart or provisioned concurrency.
|
|
54
|
+
|
|
55
|
+
Problem 4: Working locally but not in Lambda.
|
|
56
|
+
Local: docker run --rm -p 9000:8080 my-func
|
|
57
|
+
curl http://localhost:9000/2015-03-31/functions/function/invocations
|
|
58
|
+
Works! But Lambda has: read-only filesystem (except /tmp),
|
|
59
|
+
different user, and networking restrictions.
|
|
60
|
+
|
|
61
|
+
Task: Explain Lambda container image debugging. Write: AWS base
|
|
62
|
+
images vs custom images (with RIC), Dockerfile best practices for
|
|
63
|
+
Lambda, ECR configuration and permissions, cold start impact of
|
|
64
|
+
image size, local testing with RIE (Runtime Interface Emulator),
|
|
65
|
+
and when to use container images vs zip packages.
|
|
66
|
+
|
|
67
|
+
assertions:
|
|
68
|
+
- type: llm_judge
|
|
69
|
+
criteria: "Runtime Interface Client is explained — Lambda container images need RIC (Runtime Interface Client) to communicate with Lambda service. Two approaches: (1) AWS base images (public.ecr.aws/lambda/python:3.12) include RIC and RIE, simplest setup. (2) Custom base images: install awslambdaric manually, set ENTRYPOINT to RIC, CMD to handler. ENTRYPOINT + CMD pattern: ENTRYPOINT runs RIC, CMD specifies handler. Without RIC: function exits immediately without responding"
|
|
70
|
+
weight: 0.35
|
|
71
|
+
description: "Runtime Interface"
|
|
72
|
+
- type: llm_judge
|
|
73
|
+
criteria: "ECR and cold starts are covered — ECR permissions: Lambda execution role needs ecr:GetDownloadUrlForLayer, ecr:BatchGetImage. Cross-account ECR: set ECR repository policy to allow Lambda's account. Image size directly impacts cold start: 2GB image = 10+ second cold start. Optimization: use slim base images, multi-stage builds, remove build tools/caches from final image. Lambda caches frequently-used images (reduced cold start on subsequent invocations). Max image size: 10GB. Consider: if image is > 1GB, cold starts will be significant"
|
|
74
|
+
weight: 0.35
|
|
75
|
+
description: "ECR and cold starts"
|
|
76
|
+
- type: llm_judge
|
|
77
|
+
criteria: "Local testing and decision-making are practical — RIE (Runtime Interface Emulator): test container images locally. docker run -p 9000:8080 my-func, then curl localhost:9000/.../invocations. AWS base images include RIE; custom images need manual install. When to use container images: dependencies > 250MB, need specific OS packages, existing Docker workflow, ML models. When to use zip: smaller packages, faster cold starts, simpler deployment. Container images: more flexibility, larger size allowed, familiar Docker workflow. Zip: faster deployment, smaller cold starts, simpler"
|
|
78
|
+
weight: 0.30
|
|
79
|
+
description: "Local testing"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: cross-account-invocation
|
|
3
|
+
level: 3
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug cross-account Lambda invocation — diagnose permission issues, resource policies, and multi-account architecture patterns"
|
|
7
|
+
tags: [AWS, Lambda, cross-account, IAM, resource-policy, multi-account, advanced]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your organization uses separate AWS accounts for dev, staging, and
|
|
13
|
+
production. A shared services account hosts common Lambda functions
|
|
14
|
+
that other accounts invoke. Cross-account invocation fails:
|
|
15
|
+
|
|
16
|
+
Account A (application) tries to invoke a function in Account B (shared):
|
|
17
|
+
|
|
18
|
+
$ aws lambda invoke --function-name \
|
|
19
|
+
arn:aws:lambda:us-east-1:222222222222:function:shared-auth \
|
|
20
|
+
--region us-east-1 output.json
|
|
21
|
+
|
|
22
|
+
Error:
|
|
23
|
+
An error occurred (AccessDeniedException): User:
|
|
24
|
+
arn:aws:sts::111111111111:assumed-role/app-role/... is not authorized
|
|
25
|
+
to perform: lambda:InvokeFunction on resource:
|
|
26
|
+
arn:aws:lambda:us-east-1:222222222222:function:shared-auth
|
|
27
|
+
|
|
28
|
+
Cross-account invocation requires TWO things:
|
|
29
|
+
|
|
30
|
+
1. Account B (target) — Resource-based policy on the Lambda function:
|
|
31
|
+
$ aws lambda add-permission \
|
|
32
|
+
--function-name shared-auth \
|
|
33
|
+
--statement-id AllowAccountA \
|
|
34
|
+
--action lambda:InvokeFunction \
|
|
35
|
+
--principal 111111111111
|
|
36
|
+
|
|
37
|
+
2. Account A (caller) — IAM policy allowing the role to invoke:
|
|
38
|
+
{
|
|
39
|
+
"Effect": "Allow",
|
|
40
|
+
"Action": "lambda:InvokeFunction",
|
|
41
|
+
"Resource": "arn:aws:lambda:us-east-1:222222222222:function:shared-auth"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
After fixing, another issue: the shared function uses $LATEST but
|
|
45
|
+
different accounts see different versions because $LATEST was
|
|
46
|
+
updated mid-deployment. Use a specific version or alias for
|
|
47
|
+
consistency across accounts.
|
|
48
|
+
|
|
49
|
+
Additional complexity: cross-account event source mappings.
|
|
50
|
+
Account A's SQS queue triggering Account B's Lambda requires
|
|
51
|
+
the Lambda execution role to have sqs:* permissions on Account A's
|
|
52
|
+
queue, AND Account A's queue policy must allow Account B's role.
|
|
53
|
+
|
|
54
|
+
Task: Explain cross-account Lambda debugging. Write: resource
|
|
55
|
+
policies vs IAM policies (both needed), cross-account invocation
|
|
56
|
+
setup, cross-account event sources, version/alias management
|
|
57
|
+
across accounts, AWS Organizations for centralized governance,
|
|
58
|
+
and multi-account architecture patterns.
|
|
59
|
+
|
|
60
|
+
assertions:
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Cross-account permissions are explained — two policies needed: (1) resource-based policy on target Lambda (allows the calling account/role to invoke), (2) IAM policy on calling role (allows invoking the specific function ARN). Either alone is insufficient. Resource policy: aws lambda add-permission with --principal (account or role ARN). IAM policy: lambda:InvokeFunction on the cross-account function ARN. For event sources: both the Lambda execution role and the source resource policy must allow cross-account access"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "Cross-account permissions"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Multi-account patterns are covered — common architecture: shared services account (auth, logging, notification), application accounts (dev, staging, prod), security account (audit, compliance). Use AWS Organizations for account management. Share Lambda functions via: cross-account invocation (resource policy), or deploy same function to each account via CI/CD. Version management: use aliases (prod, staging) and specific versions — never $LATEST across accounts. AWS RAM (Resource Access Manager) for sharing other resources"
|
|
67
|
+
weight: 0.35
|
|
68
|
+
description: "Multi-account patterns"
|
|
69
|
+
- type: llm_judge
|
|
70
|
+
criteria: "Debugging and governance are practical — debugging cross-account: check both IAM policy AND resource policy (common to fix only one). Use aws iam simulate-principal-policy for permission testing. CloudTrail logs in both accounts for access tracking. Governance: use AWS Organizations SCPs to restrict which functions can be invoked cross-account. Tag functions with account access level. Document all cross-account dependencies. Use IaC (CDK/Terraform) to manage resource policies consistently. Cross-account X-Ray: traces can span accounts for end-to-end visibility"
|
|
71
|
+
weight: 0.30
|
|
72
|
+
description: "Debugging and governance"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: eventbridge-patterns
|
|
3
|
+
level: 3
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug EventBridge and Lambda integration — diagnose rule matching failures, event pattern issues, and event-driven architecture debugging"
|
|
7
|
+
tags: [AWS, Lambda, EventBridge, events, patterns, event-driven, advanced]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your event-driven architecture uses EventBridge to route events to
|
|
13
|
+
Lambda functions. A new event type isn't being processed:
|
|
14
|
+
|
|
15
|
+
Event published:
|
|
16
|
+
{
|
|
17
|
+
"source": "myapp.orders",
|
|
18
|
+
"detail-type": "OrderCreated",
|
|
19
|
+
"detail": {
|
|
20
|
+
"orderId": "ORD-123",
|
|
21
|
+
"status": "created",
|
|
22
|
+
"amount": 99.99,
|
|
23
|
+
"customer": { "tier": "premium" }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
EventBridge rule pattern:
|
|
28
|
+
{
|
|
29
|
+
"source": ["myapp.orders"],
|
|
30
|
+
"detail-type": ["OrderCreated"],
|
|
31
|
+
"detail": {
|
|
32
|
+
"status": ["created"],
|
|
33
|
+
"customer": {
|
|
34
|
+
"tier": ["premium", "enterprise"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
The event matches but the Lambda isn't invoked. Investigation:
|
|
40
|
+
|
|
41
|
+
1. The rule exists but the target Lambda function ARN has a typo.
|
|
42
|
+
No error raised — EventBridge silently fails to invoke the target.
|
|
43
|
+
EventBridge metrics: FailedInvocations shows the failures.
|
|
44
|
+
|
|
45
|
+
2. After fixing the ARN, the Lambda resource policy doesn't allow
|
|
46
|
+
EventBridge to invoke it. Need:
|
|
47
|
+
$ aws lambda add-permission \
|
|
48
|
+
--function-name process-premium-order \
|
|
49
|
+
--statement-id EventBridgeInvoke \
|
|
50
|
+
--action lambda:InvokeFunction \
|
|
51
|
+
--principal events.amazonaws.com \
|
|
52
|
+
--source-arn arn:aws:events:us-east-1:...:rule/premium-order-rule
|
|
53
|
+
|
|
54
|
+
3. Some events match but the Lambda receives a different format
|
|
55
|
+
than expected. EventBridge wraps the detail in its envelope:
|
|
56
|
+
{ "source": "...", "detail-type": "...", "detail": { ... }, ... }
|
|
57
|
+
The Lambda must extract data from event.detail, not event directly.
|
|
58
|
+
|
|
59
|
+
4. Events from another account don't arrive. Cross-account
|
|
60
|
+
EventBridge requires: event bus policy + rule on the receiving bus.
|
|
61
|
+
|
|
62
|
+
Task: Explain EventBridge + Lambda debugging. Write: event patterns
|
|
63
|
+
(matching rules, content filtering), common pattern mistakes, rule
|
|
64
|
+
and target configuration, cross-account/cross-region events, dead-
|
|
65
|
+
letter queues for failed deliveries, and EventBridge testing tools.
|
|
66
|
+
|
|
67
|
+
assertions:
|
|
68
|
+
- type: llm_judge
|
|
69
|
+
criteria: "Event patterns are explained — patterns match on exact values (array of allowed values), prefix, numeric comparison, exists check. Common mistakes: putting a string instead of array ('created' vs ['created']), wrong nesting level, case sensitivity. Pattern testing: use EventBridge sandbox to test patterns before deploying. Content-based filtering: only process events matching specific criteria. All fields in pattern must match — fields not in pattern are ignored (open matching). Input transformation: reshape the event before sending to target"
|
|
70
|
+
weight: 0.35
|
|
71
|
+
description: "Event patterns"
|
|
72
|
+
- type: llm_judge
|
|
73
|
+
criteria: "Target and delivery issues are covered — target Lambda must have resource policy allowing events.amazonaws.com. Misconfigured targets fail silently — check FailedInvocations metric. DLQ for rules: configure DLQ to capture events that fail to deliver to target. EventBridge invokes Lambda asynchronously — standard async retry behavior applies (2 retries). Maximum event size: 256KB. Event bus has a throughput limit (default varies by region). Cross-account: sender's event bus → receiver's event bus (requires event bus policy)"
|
|
74
|
+
weight: 0.35
|
|
75
|
+
description: "Target and delivery"
|
|
76
|
+
- type: llm_judge
|
|
77
|
+
criteria: "Testing and debugging are practical — EventBridge sandbox: test event patterns without deploying. Archive and replay: archive events for debugging, replay to test fixes. aws events put-events: manually send test events. CloudWatch Logs: enable EventBridge logging to see which rules matched. Metrics: Invocations, FailedInvocations, TriggeredRules, ThrottledRules. Use EventBridge Schema Registry to document event formats. Design events with versioning (include version field) for backward compatibility. Event catalog: document all event types, sources, and consumers"
|
|
78
|
+
weight: 0.30
|
|
79
|
+
description: "Testing and debugging"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: iac-deployment-debugging
|
|
3
|
+
level: 3
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda IaC deployments — diagnose SAM, CDK, and CloudFormation deployment failures, rollbacks, and configuration drift"
|
|
7
|
+
tags: [AWS, Lambda, SAM, CDK, CloudFormation, IaC, deployment, advanced]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your SAM deployment fails during CloudFormation stack update:
|
|
13
|
+
|
|
14
|
+
$ sam deploy --stack-name order-api --guided
|
|
15
|
+
CloudFormation events:
|
|
16
|
+
CREATE_IN_PROGRESS AWS::Lambda::Function OrderFunction
|
|
17
|
+
CREATE_FAILED AWS::Lambda::Function OrderFunction
|
|
18
|
+
"Resource handler returned message: 'Lambda function
|
|
19
|
+
order-api-OrderFunction-abc123 could not be found'
|
|
20
|
+
(Service: Lambda, Status Code: 404)"
|
|
21
|
+
ROLLBACK_IN_PROGRESS
|
|
22
|
+
|
|
23
|
+
The stack is now in ROLLBACK_IN_PROGRESS. Investigation:
|
|
24
|
+
|
|
25
|
+
1. The function code was uploaded to S3 (CodeUri) but the S3
|
|
26
|
+
bucket was in a different region than the stack. Lambda and
|
|
27
|
+
the code bucket must be in the same region.
|
|
28
|
+
|
|
29
|
+
2. After fixing the region, deployment succeeds but the function
|
|
30
|
+
uses the old code. SAM didn't detect code changes because the
|
|
31
|
+
zip file hash didn't change (build artifacts weren't cleaned):
|
|
32
|
+
$ sam build --no-cached # Force rebuild
|
|
33
|
+
|
|
34
|
+
3. CDK deployment fails differently:
|
|
35
|
+
$ cdk deploy
|
|
36
|
+
"UPDATE_ROLLBACK_COMPLETE" — stack rolled back successfully
|
|
37
|
+
but the next deploy fails because CloudFormation is stuck:
|
|
38
|
+
Need to wait for rollback to complete, or fix the issue and
|
|
39
|
+
redeploy.
|
|
40
|
+
|
|
41
|
+
4. Configuration drift: someone manually changed the Lambda
|
|
42
|
+
function's memory via console from 256MB to 512MB. The next
|
|
43
|
+
SAM deploy reverts it to 256MB (as defined in template.yaml).
|
|
44
|
+
The team is confused: "Who changed the memory back?"
|
|
45
|
+
|
|
46
|
+
5. CloudFormation stack stuck in DELETE_FAILED because the Lambda
|
|
47
|
+
function has a resource-based policy referencing a deleted
|
|
48
|
+
resource. Manual intervention needed.
|
|
49
|
+
|
|
50
|
+
Task: Explain IaC deployment debugging for Lambda. Write: common
|
|
51
|
+
SAM/CDK deployment errors, CloudFormation stack states (and how
|
|
52
|
+
to recover from each), configuration drift detection, rollback
|
|
53
|
+
strategies, blue-green deployments with SAM/CDK, and IaC best
|
|
54
|
+
practices for serverless applications.
|
|
55
|
+
|
|
56
|
+
assertions:
|
|
57
|
+
- type: llm_judge
|
|
58
|
+
criteria: "Deployment errors are explained — common SAM errors: S3 bucket region mismatch, stale build artifacts (use sam build --no-cached), template validation errors (sam validate). CDK errors: synthesis failures (TypeScript errors), asset upload failures, stack update conflicts. CloudFormation: CREATE_FAILED (resource creation error), UPDATE_ROLLBACK_COMPLETE (update failed and rolled back), DELETE_FAILED (can't delete dependent resources). Always check CloudFormation events for the specific error message — it's usually very descriptive"
|
|
59
|
+
weight: 0.35
|
|
60
|
+
description: "Deployment errors"
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Stack states and recovery are covered — ROLLBACK_IN_PROGRESS: wait for completion, then fix and redeploy. UPDATE_ROLLBACK_COMPLETE: stack is stable at previous version, safe to deploy again. DELETE_FAILED: manually delete problematic resources, then retry delete. ROLLBACK_FAILED: most dangerous — may need AWS support or manual resource cleanup. Configuration drift: use CloudFormation drift detection (aws cloudformation detect-stack-drift). Prevent: use IaC for all changes, restrict console access for production, use AWS Config rules to detect manual changes"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "Stack recovery"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Best practices are practical — use sam deploy --no-fail-on-empty-changeset for CI/CD (no error if nothing changed). SAM safe deployments: AutoPublishAlias + DeploymentPreference (Canary, Linear) for gradual rollouts with automatic rollback on CloudWatch alarm. CDK: use cdk diff before deploy to review changes. Pin dependency versions in requirements.txt/package-lock.json for reproducible builds. Use parameterized templates for multi-environment deployment. Never manually modify resources managed by CloudFormation. Use CloudFormation change sets to preview changes before applying"
|
|
67
|
+
weight: 0.30
|
|
68
|
+
description: "Best practices"
|