dojo.md 0.1.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 +72 -0
- package/courses/api-error-handling/course.yaml +16 -0
- package/courses/api-error-handling/scenarios/level-1/error-response-format.yaml +131 -0
- package/courses/api-error-handling/scenarios/level-1/http-status-codes-basics.yaml +90 -0
- package/courses/api-error-handling/scenarios/level-1/rate-limiting-basics.yaml +135 -0
- package/courses/api-error-handling/scenarios/level-1/request-validation-errors.yaml +208 -0
- package/courses/api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +189 -0
- package/courses/api-error-handling/scenarios/level-2/idempotency-retry-logic.yaml +159 -0
- package/courses/api-error-handling/scenarios/level-2/rfc-7807-problem-details.yaml +178 -0
- package/courses/api-error-handling/scenarios/level-2/webhook-error-handling.yaml +211 -0
- package/courses/api-error-handling/scenarios/level-3/distributed-tracing-errors.yaml +275 -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/github-actions-cicd/course.yaml +10 -0
- package/courses/github-actions-cicd/scenarios/level-1/actions-and-runners.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-1/basic-workflow-syntax.yaml +52 -0
- package/courses/github-actions-cicd/scenarios/level-1/branch-protection-checks.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-1/environment-variables-secrets.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-1/first-cicd-shift.yaml +62 -0
- package/courses/github-actions-cicd/scenarios/level-1/job-dependencies-outputs.yaml +62 -0
- package/courses/github-actions-cicd/scenarios/level-1/simple-ci-pipeline.yaml +57 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-debugging.yaml +90 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-status-notifications.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-triggers.yaml +56 -0
- package/courses/github-actions-cicd/scenarios/level-2/concurrency-control.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-2/conditional-execution.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-2/custom-actions-development.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-2/dependency-caching.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-2/deployment-workflows.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-2/github-packages-publishing.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-2/intermediate-cicd-shift.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-2/matrix-builds.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-2/reusable-workflows.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-2/workflow-cost-optimization.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-3/advanced-cicd-shift.yaml +64 -0
- package/courses/github-actions-cicd/scenarios/level-3/compliance-automation.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-3/docker-action-development.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-3/github-environments.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-3/monorepo-ci.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-3/oidc-cloud-deployments.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-3/release-automation.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-3/security-hardening.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-3/self-hosted-runners.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-3/workflow-optimization.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-data-architecture.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-economics-roi.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-executive-communication.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-incident-response.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-org-design.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-platform-architecture.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-training-program.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-vendor-evaluation.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/enterprise-cicd-governance.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-4/expert-cicd-shift.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-ai-future.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-behavioral-science.yaml +70 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-board-strategy.yaml +56 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-consulting-engagement.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-industry-benchmarks.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-ma-integration.yaml +73 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-product-development.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-regulatory-landscape.yaml +72 -0
- package/courses/github-actions-cicd/scenarios/level-5/comprehensive-cicd-system.yaml +66 -0
- package/courses/github-actions-cicd/scenarios/level-5/master-cicd-shift.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-2/api-change-review.yaml +82 -0
- package/courses/github-pr-review/scenarios/level-2/automated-review-tooling.yaml +53 -0
- package/courses/github-pr-review/scenarios/level-2/cross-team-review.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-2/intermediate-review-shift.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-2/performance-review-patterns.yaml +99 -0
- package/courses/github-pr-review/scenarios/level-2/review-disagreement-resolution.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-2/review-metrics-analysis.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-2/review-turnaround-sla.yaml +54 -0
- package/courses/github-pr-review/scenarios/level-2/stacked-pr-review.yaml +65 -0
- package/courses/github-pr-review/scenarios/level-3/advanced-review-shift.yaml +65 -0
- package/courses/github-pr-review/scenarios/level-3/ai-powered-review.yaml +58 -0
- package/courses/github-pr-review/scenarios/level-3/compliance-review-process.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-3/cross-functional-review.yaml +60 -0
- package/courses/github-pr-review/scenarios/level-3/incident-driven-review.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-3/large-scale-review-operations.yaml +55 -0
- package/courses/github-pr-review/scenarios/level-3/monorepo-review-process.yaml +68 -0
- package/courses/github-pr-review/scenarios/level-3/review-automation-platform.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-3/review-culture-design.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-3/review-data-pipeline.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/enterprise-review-operations.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-4/expert-review-shift.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/review-data-architecture.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-4/review-economics-roi.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-4/review-executive-communication.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-4/review-incident-postmortem.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-4/review-org-design.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/review-platform-architecture.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-4/review-training-program.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-4/review-vendor-evaluation.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-5/comprehensive-review-system.yaml +68 -0
- package/courses/github-pr-review/scenarios/level-5/master-review-shift.yaml +73 -0
- package/courses/github-pr-review/scenarios/level-5/review-ai-future.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-5/review-behavioral-science.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-5/review-board-strategy.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-5/review-consulting-engagement.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-5/review-devtools-product.yaml +71 -0
- package/courses/github-pr-review/scenarios/level-5/review-industry-benchmarks.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-5/review-ma-integration.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-5/review-regulatory-landscape.yaml +78 -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/course.yaml +11 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/explain-analyze-basics.yaml +80 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +77 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/index-fundamentals.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/join-basics.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/select-star-problems.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/vacuum-and-statistics.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/autovacuum-tuning.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/composite-index-design.yaml +81 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/covering-indexes.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/cte-optimization.yaml +83 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +66 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/join-optimization.yaml +72 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/partial-and-expression-indexes.yaml +75 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/query-planner-settings.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/subquery-optimization.yaml +67 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/window-function-optimization.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/connection-pooling.yaml +60 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/full-text-search-optimization.yaml +66 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/jsonb-optimization.yaml +88 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +80 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/materialized-view-optimization.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/parallel-query-execution.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/specialized-index-types.yaml +67 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/write-optimization.yaml +65 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/data-architecture-analytics.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/database-executive-communication.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/database-migration-planning.yaml +57 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/enterprise-database-governance.yaml +52 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/optimizer-internals.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/performance-sla-design.yaml +58 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/read-replica-optimization.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/vendor-evaluation.yaml +73 -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/rest-api-error-handling/course.yaml +11 -0
- package/courses/rest-api-error-handling/scenarios/level-1/authentication-errors.yaml +71 -0
- package/courses/rest-api-error-handling/scenarios/level-1/content-negotiation-errors.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-1/error-logging-basics.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-1/error-response-format.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-1/first-error-handling-shift.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-1/http-status-codes.yaml +46 -0
- package/courses/rest-api-error-handling/scenarios/level-1/not-found-errors.yaml +52 -0
- package/courses/rest-api-error-handling/scenarios/level-1/rate-limiting-errors.yaml +56 -0
- package/courses/rest-api-error-handling/scenarios/level-1/request-validation-errors.yaml +59 -0
- package/courses/rest-api-error-handling/scenarios/level-1/server-error-handling.yaml +55 -0
- package/courses/rest-api-error-handling/scenarios/level-2/api-versioning-errors.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-2/batch-request-errors.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +52 -0
- package/courses/rest-api-error-handling/scenarios/level-2/error-code-taxonomy.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-2/error-monitoring-alerting.yaml +53 -0
- package/courses/rest-api-error-handling/scenarios/level-2/intermediate-error-shift.yaml +69 -0
- package/courses/rest-api-error-handling/scenarios/level-2/pagination-errors.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-2/retry-and-idempotency.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-2/rfc7807-problem-details.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-2/webhook-error-handling.yaml +55 -0
- package/courses/rest-api-error-handling/scenarios/level-3/advanced-error-shift.yaml +72 -0
- package/courses/rest-api-error-handling/scenarios/level-3/api-gateway-errors.yaml +71 -0
- package/courses/rest-api-error-handling/scenarios/level-3/async-api-errors.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-3/caching-error-scenarios.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-3/chaos-engineering-apis.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-3/database-error-handling.yaml +79 -0
- package/courses/rest-api-error-handling/scenarios/level-3/distributed-error-propagation.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-3/error-budgets-sre.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-3/error-correlation.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-3/graphql-vs-rest-errors.yaml +73 -0
- package/courses/rest-api-error-handling/scenarios/level-4/compliance-error-handling.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/enterprise-error-governance.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-analytics-platform.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-cost-optimization.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-executive-communication.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-handling-architecture.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-org-design.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-sla-design.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-training-program.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-4/expert-error-shift.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-5/comprehensive-error-system.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-ai-future.yaml +75 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-behavioral-science.yaml +73 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-board-strategy.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-consulting-engagement.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-industry-benchmarks.yaml +72 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-ma-integration.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-product-development.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-regulatory-landscape.yaml +80 -0
- package/courses/rest-api-error-handling/scenarios/level-5/master-error-shift.yaml +73 -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/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +6 -5
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +4 -0
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +6 -18
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/train.d.ts.map +1 -1
- package/dist/cli/commands/train.js +18 -18
- package/dist/cli/commands/train.js.map +1 -1
- package/dist/cli/index.js +93 -55
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/run-demo.js +2 -1
- package/dist/cli/run-demo.js.map +1 -1
- package/dist/cli/setup.d.ts +18 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +154 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/engine/agent-bridge.d.ts +5 -2
- package/dist/engine/agent-bridge.d.ts.map +1 -1
- package/dist/engine/agent-bridge.js +36 -9
- package/dist/engine/agent-bridge.js.map +1 -1
- package/dist/engine/loader.d.ts +21 -0
- package/dist/engine/loader.d.ts.map +1 -1
- package/dist/engine/loader.js +54 -1
- package/dist/engine/loader.js.map +1 -1
- package/dist/engine/training-loop.d.ts.map +1 -1
- package/dist/engine/training-loop.js +1 -0
- package/dist/engine/training-loop.js.map +1 -1
- package/dist/engine/training.d.ts.map +1 -1
- package/dist/engine/training.js +1 -0
- package/dist/engine/training.js.map +1 -1
- package/dist/generator/skill-generator.d.ts +1 -1
- package/dist/generator/skill-generator.d.ts.map +1 -1
- package/dist/generator/skill-generator.js +21 -2
- package/dist/generator/skill-generator.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +11 -26
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session-manager.d.ts +9 -4
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +65 -28
- package/dist/mcp/session-manager.js.map +1 -1
- package/dist/types/schemas.d.ts +38 -13
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +9 -5
- package/dist/types/schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: api-gateway-integration
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda and API Gateway integration — diagnose response format errors, CORS issues, and proxy integration mismatches"
|
|
7
|
+
tags: [AWS, Lambda, API-Gateway, CORS, proxy-integration, response-format, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function works when invoked directly but returns 502
|
|
13
|
+
Bad Gateway when called through API Gateway:
|
|
14
|
+
|
|
15
|
+
$ curl https://api.example.com/orders
|
|
16
|
+
{"message": "Internal server error"}
|
|
17
|
+
|
|
18
|
+
API Gateway CloudWatch Logs show:
|
|
19
|
+
Execution failed due to configuration error:
|
|
20
|
+
Malformed Lambda proxy response
|
|
21
|
+
|
|
22
|
+
The Lambda function returns:
|
|
23
|
+
return { "statusCode": 200, "body": orders }
|
|
24
|
+
|
|
25
|
+
But API Gateway Lambda Proxy Integration requires a specific format:
|
|
26
|
+
{
|
|
27
|
+
"statusCode": 200,
|
|
28
|
+
"headers": { "Content-Type": "application/json" },
|
|
29
|
+
"body": "{\"orders\": [...]}" // body MUST be a string!
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
The body must be a JSON string, not an object. And headers must
|
|
33
|
+
be included.
|
|
34
|
+
|
|
35
|
+
After fixing the response format, a CORS error appears:
|
|
36
|
+
Access to XMLHttpRequest at 'https://api.example.com/orders'
|
|
37
|
+
from origin 'https://myapp.com' has been blocked by CORS policy:
|
|
38
|
+
No 'Access-Control-Allow-Origin' header is present.
|
|
39
|
+
|
|
40
|
+
CORS headers must be returned by the Lambda function (not just
|
|
41
|
+
configured in API Gateway for proxy integration):
|
|
42
|
+
{
|
|
43
|
+
"statusCode": 200,
|
|
44
|
+
"headers": {
|
|
45
|
+
"Content-Type": "application/json",
|
|
46
|
+
"Access-Control-Allow-Origin": "https://myapp.com",
|
|
47
|
+
"Access-Control-Allow-Methods": "GET,POST,OPTIONS",
|
|
48
|
+
"Access-Control-Allow-Headers": "Content-Type,Authorization"
|
|
49
|
+
},
|
|
50
|
+
"body": JSON.stringify({ orders: [...] })
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
Task: Explain API Gateway + Lambda debugging. Write: the proxy
|
|
54
|
+
integration response format requirement, common response format
|
|
55
|
+
errors and fixes, CORS with Lambda proxy, API Gateway error codes
|
|
56
|
+
(502 = malformed response, 504 = Lambda timeout, 403 = auth),
|
|
57
|
+
and how to test API Gateway integrations.
|
|
58
|
+
|
|
59
|
+
assertions:
|
|
60
|
+
- type: llm_judge
|
|
61
|
+
criteria: "Response format is explained — Lambda proxy integration requires: statusCode (integer), headers (object, optional but recommended), body (string — must JSON.stringify objects!), isBase64Encoded (boolean, for binary). Missing statusCode or non-string body = 502 Malformed Lambda proxy response. Common mistake: returning a raw object instead of JSON.stringify for body. Non-proxy integration allows mapping templates but is more complex to configure"
|
|
62
|
+
weight: 0.35
|
|
63
|
+
description: "Response format"
|
|
64
|
+
- type: llm_judge
|
|
65
|
+
criteria: "CORS and error codes are covered — CORS with proxy integration: Lambda must return Access-Control-Allow-Origin, Access-Control-Allow-Methods, Access-Control-Allow-Headers in response headers. API Gateway CORS configuration only handles the OPTIONS preflight — actual response headers come from Lambda. Error codes: 502 = malformed Lambda response or Lambda error, 504 = Lambda timeout (API GW has 29s hard limit), 403 = missing/invalid API key or authorizer rejection, 429 = throttled. Check API Gateway execution logs (enable in stage settings) for details"
|
|
66
|
+
weight: 0.35
|
|
67
|
+
description: "CORS and errors"
|
|
68
|
+
- type: llm_judge
|
|
69
|
+
criteria: "Testing approach is practical — test Lambda independently first: aws lambda invoke. Then test via API Gateway: use the API Gateway console's test feature (shows request/response transformation). Use curl -v to see full HTTP response headers. Enable API Gateway execution logging (detailed) for debugging. Check both Lambda CloudWatch Logs and API Gateway CloudWatch Logs. Use AWS SAM CLI (sam local start-api) for local testing of the full API Gateway → Lambda integration. Postman or httpie for systematic API testing"
|
|
70
|
+
weight: 0.30
|
|
71
|
+
description: "Testing approach"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: cloudwatch-logs-basics
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda with CloudWatch Logs — read log streams, understand the REPORT line, and use structured logging for effective debugging"
|
|
7
|
+
tags: [AWS, Lambda, CloudWatch, logs, REPORT, structured-logging, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function returns an error but you don't know why.
|
|
13
|
+
Time to check the logs:
|
|
14
|
+
|
|
15
|
+
$ aws logs filter-log-events \
|
|
16
|
+
--log-group-name /aws/lambda/process-order \
|
|
17
|
+
--start-time 1701432000000
|
|
18
|
+
|
|
19
|
+
Each invocation produces these log entries:
|
|
20
|
+
|
|
21
|
+
START RequestId: abc-123 Version: $LATEST
|
|
22
|
+
2024-12-01T10:00:00.123Z abc-123 INFO Processing order: ORD-456
|
|
23
|
+
2024-12-01T10:00:00.456Z abc-123 INFO Fetching customer: CUST-789
|
|
24
|
+
2024-12-01T10:00:01.789Z abc-123 ERROR Customer not found: CUST-789
|
|
25
|
+
2024-12-01T10:00:01.790Z abc-123 ERROR {
|
|
26
|
+
"errorType": "CustomerNotFoundError",
|
|
27
|
+
"errorMessage": "Customer CUST-789 does not exist",
|
|
28
|
+
"stackTrace": ["at getCustomer (/var/task/handler.js:25:11)"]
|
|
29
|
+
}
|
|
30
|
+
END RequestId: abc-123
|
|
31
|
+
REPORT RequestId: abc-123 Duration: 1667.45 ms
|
|
32
|
+
Billed Duration: 1668 ms Memory Size: 256 MB
|
|
33
|
+
Max Memory Used: 89 MB Init Duration: 423.12 ms
|
|
34
|
+
|
|
35
|
+
Understanding the REPORT line:
|
|
36
|
+
- Duration: actual execution time (1667.45ms)
|
|
37
|
+
- Billed Duration: rounded up for billing (1668ms)
|
|
38
|
+
- Memory Size: configured memory (256MB)
|
|
39
|
+
- Max Memory Used: peak memory during execution (89MB)
|
|
40
|
+
- Init Duration: cold start initialization time (only on cold starts)
|
|
41
|
+
|
|
42
|
+
Problem: The logs are unstructured text, making it hard to search
|
|
43
|
+
across thousands of invocations. Better approach: structured JSON
|
|
44
|
+
logging with correlation IDs.
|
|
45
|
+
|
|
46
|
+
Task: Explain CloudWatch Logs for Lambda debugging. Write: how
|
|
47
|
+
Lambda logs are organized (log groups, log streams), understanding
|
|
48
|
+
the REPORT line metrics, structured logging best practices (JSON
|
|
49
|
+
format, correlation IDs), searching logs (filter patterns, Logs
|
|
50
|
+
Insights queries), and common logging mistakes to avoid.
|
|
51
|
+
|
|
52
|
+
assertions:
|
|
53
|
+
- type: llm_judge
|
|
54
|
+
criteria: "Log organization is explained — log group: /aws/lambda/<function-name> (one per function). Log streams: one per execution environment (not per invocation — multiple warm invocations share a stream). Each invocation has START, your logs, END, and REPORT markers. RequestId links all entries for one invocation. CloudWatch Logs Insights: SQL-like query language to search across streams. Example: filter @message like /ERROR/ | stats count() by bin(1h)"
|
|
55
|
+
weight: 0.35
|
|
56
|
+
description: "Log organization"
|
|
57
|
+
- type: llm_judge
|
|
58
|
+
criteria: "REPORT line and structured logging are covered — REPORT fields: Duration (actual), Billed Duration (billing), Memory Size (configured), Max Memory Used (peak, for right-sizing), Init Duration (cold start only, absent on warm). XRAY TraceId appears if tracing enabled. Structured logging: use JSON format with consistent fields (requestId, level, message, timestamp). Libraries: Powertools for AWS Lambda (Python/TypeScript/Java) provides structured logging, tracing, metrics. Include correlation IDs (orderId, customerId) for tracing business transactions"
|
|
59
|
+
weight: 0.35
|
|
60
|
+
description: "REPORT and structured logging"
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Practical tips are included — common mistakes: logging sensitive data (PII, credentials), excessive logging (increases costs and CloudWatch charges), not setting log retention (logs stored forever by default = growing costs). Set retention policy: 7/14/30 days based on needs. Use log levels (DEBUG in dev, INFO/WARN in prod). CloudWatch Logs Insights queries are powerful: parse, filter, stats, sort. Cost awareness: CloudWatch Logs charged per GB ingested — structured logging with appropriate levels controls costs"
|
|
63
|
+
weight: 0.30
|
|
64
|
+
description: "Practical tips"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: cold-start-basics
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda cold start issues — understand cold vs warm invocations, identify cold start impact, and apply basic optimization techniques"
|
|
7
|
+
tags: [AWS, Lambda, cold-start, performance, initialization, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Users complain that your API is "sometimes slow." CloudWatch metrics
|
|
13
|
+
show the Lambda function behind API Gateway has inconsistent latency:
|
|
14
|
+
|
|
15
|
+
Most requests: 50-100ms
|
|
16
|
+
Some requests: 2,000-5,000ms (40x slower!)
|
|
17
|
+
|
|
18
|
+
CloudWatch Logs reveal the pattern:
|
|
19
|
+
|
|
20
|
+
Slow invocation (cold start):
|
|
21
|
+
INIT_START Runtime Version: nodejs20.x
|
|
22
|
+
START RequestId: abc-123
|
|
23
|
+
2024-12-01T10:00:00.000Z Connecting to database...
|
|
24
|
+
2024-12-01T10:00:01.500Z Database connected
|
|
25
|
+
2024-12-01T10:00:02.000Z Processing request...
|
|
26
|
+
END RequestId: abc-123
|
|
27
|
+
REPORT RequestId: abc-123 Duration: 2100.00 ms
|
|
28
|
+
Billed Duration: 2100 ms Init Duration: 1850.00 ms
|
|
29
|
+
|
|
30
|
+
Fast invocation (warm):
|
|
31
|
+
START RequestId: def-456
|
|
32
|
+
2024-12-01T10:01:00.000Z Processing request...
|
|
33
|
+
END RequestId: def-456
|
|
34
|
+
REPORT RequestId: def-456 Duration: 55.00 ms
|
|
35
|
+
Billed Duration: 56 ms
|
|
36
|
+
|
|
37
|
+
The key difference: "Init Duration" appears only on cold starts.
|
|
38
|
+
This is the time Lambda takes to:
|
|
39
|
+
1. Download your code package
|
|
40
|
+
2. Start the runtime (Node.js/Python/Java)
|
|
41
|
+
3. Run initialization code (imports, DB connections, SDK setup)
|
|
42
|
+
|
|
43
|
+
After a cold start, the execution environment is reused for
|
|
44
|
+
subsequent invocations (warm starts) — no Init Duration.
|
|
45
|
+
|
|
46
|
+
Cold starts happen when:
|
|
47
|
+
- First invocation after deployment
|
|
48
|
+
- Scaling up (new concurrent executions)
|
|
49
|
+
- After ~15 minutes of inactivity (environment recycled)
|
|
50
|
+
|
|
51
|
+
Task: Explain Lambda cold starts. Write: what causes cold starts,
|
|
52
|
+
how to identify them in logs (INIT_START, Init Duration in REPORT),
|
|
53
|
+
factors affecting cold start duration (package size, runtime,
|
|
54
|
+
memory, VPC), basic optimizations (minimize dependencies, increase
|
|
55
|
+
memory, init code outside handler), and when cold starts matter
|
|
56
|
+
vs when they don't.
|
|
57
|
+
|
|
58
|
+
assertions:
|
|
59
|
+
- type: llm_judge
|
|
60
|
+
criteria: "Cold start mechanics are explained — cold start = Lambda creates new execution environment (download code, start runtime, run init). Identified by: INIT_START in logs, Init Duration in REPORT line. Warm start reuses existing environment — no init overhead. Cold starts happen: first invocation, scaling up new instances, after idle timeout (~15 min). Factors: package size (larger = slower download), runtime (Java/C# slowest, Python/Node fastest), memory setting (more memory = more CPU = faster init), VPC adds ENI attachment time"
|
|
61
|
+
weight: 0.35
|
|
62
|
+
description: "Cold start mechanics"
|
|
63
|
+
- type: llm_judge
|
|
64
|
+
criteria: "Basic optimizations are covered — minimize package size: remove unused dependencies, use tree shaking, use Lambda layers for shared code. Increase memory: Lambda allocates CPU proportional to memory — 1769MB = 1 vCPU. Higher memory = faster initialization. Init code outside handler: database connections, SDK clients created at module level are reused across warm invocations. Avoid importing unused modules. For critical latency: provisioned concurrency keeps environments warm (eliminates cold starts entirely)"
|
|
65
|
+
weight: 0.35
|
|
66
|
+
description: "Basic optimizations"
|
|
67
|
+
- type: llm_judge
|
|
68
|
+
criteria: "When cold starts matter is explained — matters: synchronous APIs (user-facing latency), real-time processing. Doesn't matter: async processing (SQS consumers, S3 events), batch jobs, scheduled tasks. Cold start frequency: at steady traffic with consistent load, most invocations are warm. Spiky traffic causes more cold starts. Monitor: CloudWatch metric ConcurrentExecutions shows scaling events. p99 latency includes cold starts, p50 typically doesn't. Evaluate whether cold start optimization is worth the effort based on actual user impact"
|
|
69
|
+
weight: 0.30
|
|
70
|
+
description: "When it matters"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: environment-variable-issues
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda environment variable issues — diagnose missing, incorrect, or encrypted environment variables and configuration problems"
|
|
7
|
+
tags: [AWS, Lambda, environment-variables, configuration, KMS, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function fails with a connection error:
|
|
13
|
+
|
|
14
|
+
{
|
|
15
|
+
"errorType": "Error",
|
|
16
|
+
"errorMessage": "connect ECONNREFUSED 127.0.0.1:5432"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
The function tries to connect to a database but the connection
|
|
20
|
+
string is wrong. Checking the code:
|
|
21
|
+
|
|
22
|
+
const dbHost = process.env.DATABASE_URL;
|
|
23
|
+
// dbHost is undefined!
|
|
24
|
+
|
|
25
|
+
The environment variable is named DB_URL in the Lambda configuration
|
|
26
|
+
but the code expects DATABASE_URL. Classic mismatch.
|
|
27
|
+
|
|
28
|
+
$ aws lambda get-function-configuration --function-name my-func \
|
|
29
|
+
--query "Environment.Variables"
|
|
30
|
+
{
|
|
31
|
+
"DB_URL": "postgresql://prod-db.example.com:5432/mydb",
|
|
32
|
+
"API_KEY": "sk-prod-abc123..."
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
Issues found:
|
|
36
|
+
|
|
37
|
+
1. Variable name mismatch — DB_URL vs DATABASE_URL. Case-sensitive.
|
|
38
|
+
|
|
39
|
+
2. API_KEY is stored as plain text in the Lambda configuration.
|
|
40
|
+
Anyone with lambda:GetFunctionConfiguration permission can see
|
|
41
|
+
it. Should use AWS Secrets Manager or encrypted env vars.
|
|
42
|
+
|
|
43
|
+
3. After fixing the name, the function still fails in a new
|
|
44
|
+
deployment. The developer tested with staging env vars but
|
|
45
|
+
deployed to production without updating them. No environment-
|
|
46
|
+
specific configuration management.
|
|
47
|
+
|
|
48
|
+
4. Environment variables have a 4KB total size limit. A function
|
|
49
|
+
with many config values hits this limit:
|
|
50
|
+
"InvalidParameterValueException: Lambda was unable to configure
|
|
51
|
+
your environment variables because the environment variables you
|
|
52
|
+
have provided exceeded the 4KB limit."
|
|
53
|
+
|
|
54
|
+
Task: Explain Lambda environment variable debugging. Write: how to
|
|
55
|
+
check and set environment variables (CLI, console, IaC), common
|
|
56
|
+
mistakes (name mismatches, case sensitivity), encryption with KMS,
|
|
57
|
+
the 4KB limit and alternatives (Secrets Manager, Parameter Store,
|
|
58
|
+
S3), and environment management across stages.
|
|
59
|
+
|
|
60
|
+
assertions:
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Environment variable basics are explained — env vars set via console, CLI (aws lambda update-function-configuration --environment), or IaC (SAM/CDK/Terraform). Variables are key-value strings, case-sensitive. Available via process.env (Node.js), os.environ (Python), System.getenv (Java). Common errors: name mismatch between code and config, forgetting to set in new deployments, using wrong values for the environment (staging vs production). Variables are set at deploy time, not runtime"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "Environment variable basics"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Security and limits are covered — env vars visible to anyone with lambda:GetFunctionConfiguration permission. Sensitive values: use AWS Secrets Manager (automatic rotation, cross-account access) or SSM Parameter Store (simpler, cheaper). KMS encryption: Lambda can encrypt env vars with custom KMS key — decrypted at runtime. 4KB total limit for all env vars combined. For large config: use Parameter Store (up to 8KB standard, 64KB advanced) or S3 for config files. Never put secrets in plain text env vars — use Secrets Manager"
|
|
67
|
+
weight: 0.35
|
|
68
|
+
description: "Security and limits"
|
|
69
|
+
- type: llm_judge
|
|
70
|
+
criteria: "Environment management is practical — use IaC (SAM, CDK) with environment-specific parameter files. SAM: --parameter-overrides for stage-specific values. CDK: separate stacks or context variables per environment. Never hardcode environment-specific values in code. Pattern: store environment name as env var (STAGE=prod), look up other config from Parameter Store using STAGE prefix. Validate required env vars at function initialization (fail fast if missing). Use .env files for local development (SAM local supports --env-vars)"
|
|
71
|
+
weight: 0.30
|
|
72
|
+
description: "Environment management"
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: first-debugging-shift
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Combined first debugging shift — diagnose a Lambda-based API with timeout, permission, memory, and configuration issues simultaneously"
|
|
7
|
+
tags: [AWS, Lambda, troubleshooting, combined, shift-simulation, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You've joined a team that has a serverless API with 4 Lambda
|
|
13
|
+
functions behind API Gateway. "The API is broken" — users report
|
|
14
|
+
various errors. You need to triage everything:
|
|
15
|
+
|
|
16
|
+
$ curl https://api.example.com/orders
|
|
17
|
+
→ 502 Bad Gateway
|
|
18
|
+
|
|
19
|
+
$ curl https://api.example.com/users
|
|
20
|
+
→ 504 Gateway Timeout (after 29 seconds)
|
|
21
|
+
|
|
22
|
+
$ curl https://api.example.com/products
|
|
23
|
+
→ 403 {"message": "Forbidden"}
|
|
24
|
+
|
|
25
|
+
$ curl https://api.example.com/payments
|
|
26
|
+
→ 200 but returns empty data instead of payment records
|
|
27
|
+
|
|
28
|
+
Investigation:
|
|
29
|
+
|
|
30
|
+
1. /orders → 502: Lambda returns malformed response.
|
|
31
|
+
CloudWatch Logs: function returns {body: orders} without
|
|
32
|
+
statusCode and body is not a string. Fix: proper proxy
|
|
33
|
+
integration response format.
|
|
34
|
+
|
|
35
|
+
2. /users → 504: Lambda times out.
|
|
36
|
+
REPORT: Duration 29001ms, timeout is 30s. Function connects
|
|
37
|
+
to RDS in VPC but has no NAT Gateway for the Secrets Manager
|
|
38
|
+
call that retrieves the DB password. The Secrets Manager call
|
|
39
|
+
hangs because there's no internet access from the private subnet.
|
|
40
|
+
Fix: add VPC endpoint for Secrets Manager, or add NAT Gateway.
|
|
41
|
+
|
|
42
|
+
3. /products → 403: API key required but not sent.
|
|
43
|
+
API Gateway has "API Key Required: true" on this method but
|
|
44
|
+
documentation doesn't mention it. The API key is correct in
|
|
45
|
+
the x-api-key header. Fix: send the API key header, or remove
|
|
46
|
+
the API key requirement if it's unintended.
|
|
47
|
+
|
|
48
|
+
4. /payments → 200 but empty: Lambda runs successfully but
|
|
49
|
+
DynamoDB query returns no items. The function reads from
|
|
50
|
+
table "Payments" but the actual table is "payments-prod"
|
|
51
|
+
(different name). The IAM role has permission on "payments-prod"
|
|
52
|
+
but the code hardcodes "Payments". Fix: use environment variable
|
|
53
|
+
for table name, update code to match actual table.
|
|
54
|
+
|
|
55
|
+
Task: Walk through diagnosing all four issues. Write: the triage
|
|
56
|
+
approach (check HTTP status codes, then CloudWatch Logs), how
|
|
57
|
+
to debug each error type, the VPC Lambda networking gotcha,
|
|
58
|
+
API Gateway configuration checks, and lessons learned for
|
|
59
|
+
preventing these issues.
|
|
60
|
+
|
|
61
|
+
assertions:
|
|
62
|
+
- type: llm_judge
|
|
63
|
+
criteria: "All four issues are diagnosed — (1) 502 malformed response: fix Lambda proxy response format (statusCode, string body). (2) 504 timeout: VPC Lambda needs NAT Gateway or VPC endpoints for AWS service access. (3) 403 API key: check API Gateway method settings for required API key, send x-api-key header. (4) 200 empty data: code references wrong DynamoDB table name — use environment variables for resource names, not hardcoded strings"
|
|
64
|
+
weight: 0.35
|
|
65
|
+
description: "All issues diagnosed"
|
|
66
|
+
- type: llm_judge
|
|
67
|
+
criteria: "Triage methodology is systematic — start with HTTP status code (tells error category: 4xx client, 5xx server). Check API Gateway logs first (shows if error is in API GW config or Lambda). Then check Lambda CloudWatch Logs for each function. Read the REPORT line for timeout/memory issues. Check IAM for permission issues. Check VPC configuration for networking issues. Work through issues by severity: 502/504 first (service down), then 403 (auth), then data issues"
|
|
68
|
+
weight: 0.35
|
|
69
|
+
description: "Triage methodology"
|
|
70
|
+
- type: llm_judge
|
|
71
|
+
criteria: "Prevention lessons are practical — use IaC (SAM/CDK) for consistent configuration. Use environment variables for all resource names (table names, queue URLs, bucket names). Test Lambda responses match API Gateway proxy format before deploying. For VPC Lambda: always plan networking (NAT Gateway or VPC endpoints for AWS services). Document API requirements (API keys, auth). Use local testing (SAM CLI) to catch errors before deployment. Set up CloudWatch alarms for Errors, Throttles, Duration"
|
|
72
|
+
weight: 0.30
|
|
73
|
+
description: "Prevention lessons"
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: handler-import-errors
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda handler and import errors — diagnose module not found, handler not found, and dependency packaging issues"
|
|
7
|
+
tags: [AWS, Lambda, handler, import, module-not-found, packaging, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function fails immediately on invocation:
|
|
13
|
+
|
|
14
|
+
{
|
|
15
|
+
"errorType": "Runtime.ImportModuleError",
|
|
16
|
+
"errorMessage": "Unable to import module 'handler': No module named 'requests'"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
The function works locally but fails in Lambda. The issue: the
|
|
20
|
+
'requests' library isn't included in the deployment package.
|
|
21
|
+
|
|
22
|
+
Lambda runtimes only include standard library modules. Third-party
|
|
23
|
+
dependencies must be packaged with your code:
|
|
24
|
+
|
|
25
|
+
# Python — create deployment package with dependencies:
|
|
26
|
+
pip install requests -t ./package/
|
|
27
|
+
cd package && zip -r ../deployment.zip . && cd ..
|
|
28
|
+
zip deployment.zip handler.py
|
|
29
|
+
|
|
30
|
+
Another common error:
|
|
31
|
+
{
|
|
32
|
+
"errorType": "Runtime.HandlerNotFound",
|
|
33
|
+
"errorMessage": "Handler 'app.handler' missing on module 'app'"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Causes:
|
|
37
|
+
1. Wrong handler configuration — Lambda handler format is file.function
|
|
38
|
+
(Python: handler.lambda_handler, Node: index.handler)
|
|
39
|
+
2. File is in a subdirectory but handler doesn't include the path
|
|
40
|
+
(src/handler.lambda_handler won't work — zip must have handler.py
|
|
41
|
+
at the root)
|
|
42
|
+
3. Typo in function name
|
|
43
|
+
|
|
44
|
+
Node.js variant:
|
|
45
|
+
{
|
|
46
|
+
"errorType": "Runtime.UserCodeSyntaxError",
|
|
47
|
+
"errorMessage": "SyntaxError: Cannot use import statement outside a module"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
Using ES modules (import/export) requires either:
|
|
51
|
+
- File extension .mjs, or
|
|
52
|
+
- "type": "module" in package.json
|
|
53
|
+
|
|
54
|
+
Task: Explain Lambda handler and import debugging. Write: the handler
|
|
55
|
+
format for each runtime (Python, Node.js, Java), common import/module
|
|
56
|
+
errors and their causes, how to package dependencies correctly (zip,
|
|
57
|
+
layers, container images), and the deployment package structure.
|
|
58
|
+
|
|
59
|
+
assertions:
|
|
60
|
+
- type: llm_judge
|
|
61
|
+
criteria: "Handler format is explained — Python: file_name.function_name (e.g., handler.lambda_handler). Node.js: file_name.export_name (e.g., index.handler). Java: package.Class::method. The handler file must be at the root of the zip or in the path specified. Runtime.HandlerNotFound: file or function doesn't exist at the expected location. Runtime.ImportModuleError: dependency not included in package. Always test with lambda invoke locally (SAM CLI) before deploying"
|
|
62
|
+
weight: 0.35
|
|
63
|
+
description: "Handler format"
|
|
64
|
+
- type: llm_judge
|
|
65
|
+
criteria: "Dependency packaging is covered — Python: pip install -t ./package/, include in zip. Use requirements.txt. Node.js: npm install in project, zip node_modules with code. Lambda Layers: shared dependencies across functions (up to 5 layers, 250MB unzipped total). Container images: full control over runtime and dependencies (up to 10GB). Common mistakes: installing for wrong OS (Lambda runs Amazon Linux — build on Linux or use Docker), missing native modules (needs compilation for Lambda architecture: x86_64 or arm64)"
|
|
66
|
+
weight: 0.35
|
|
67
|
+
description: "Dependency packaging"
|
|
68
|
+
- type: llm_judge
|
|
69
|
+
criteria: "Debugging workflow is practical — check CloudWatch Logs first (error type tells you the category). Runtime.ImportModuleError: dependency missing from package or layer. Runtime.HandlerNotFound: wrong handler config or file structure. Runtime.UserCodeSyntaxError: code syntax issue (ESM vs CJS for Node.js). Test locally: AWS SAM CLI (sam local invoke) simulates Lambda environment. Check package structure: unzip -l deployment.zip to verify file locations. Verify architecture: Lambda ARM (Graviton2) needs arm64 native dependencies"
|
|
70
|
+
weight: 0.30
|
|
71
|
+
description: "Debugging workflow"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: iam-permission-errors
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda IAM permission errors — diagnose AccessDenied errors from missing or incorrect IAM policies"
|
|
7
|
+
tags: [AWS, Lambda, IAM, permissions, AccessDenied, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function fails when trying to read from S3:
|
|
13
|
+
|
|
14
|
+
{
|
|
15
|
+
"errorType": "AccessDeniedException",
|
|
16
|
+
"errorMessage": "User: arn:aws:sts::123456789012:assumed-role/
|
|
17
|
+
process-order-role/process-order is not authorized to perform:
|
|
18
|
+
s3:GetObject on resource: arn:aws:s3:::my-bucket/orders/*"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
The error clearly states what's missing: s3:GetObject permission on
|
|
22
|
+
the specific S3 bucket and path.
|
|
23
|
+
|
|
24
|
+
Checking the Lambda's execution role:
|
|
25
|
+
$ aws iam get-role --role-name process-order-role
|
|
26
|
+
$ aws iam list-attached-role-policies --role-name process-order-role
|
|
27
|
+
|
|
28
|
+
The role only has AWSLambdaBasicExecutionRole (CloudWatch Logs).
|
|
29
|
+
It needs an additional policy for S3 access.
|
|
30
|
+
|
|
31
|
+
Fix:
|
|
32
|
+
$ aws iam put-role-policy --role-name process-order-role \
|
|
33
|
+
--policy-name S3ReadAccess \
|
|
34
|
+
--policy-document '{
|
|
35
|
+
"Version": "2012-10-17",
|
|
36
|
+
"Statement": [{
|
|
37
|
+
"Effect": "Allow",
|
|
38
|
+
"Action": "s3:GetObject",
|
|
39
|
+
"Resource": "arn:aws:s3:::my-bucket/orders/*"
|
|
40
|
+
}]
|
|
41
|
+
}'
|
|
42
|
+
|
|
43
|
+
Common IAM mistakes with Lambda:
|
|
44
|
+
1. Using s3:* instead of specific actions (security risk)
|
|
45
|
+
2. Using Resource: "*" instead of specific ARNs
|
|
46
|
+
3. Forgetting that Lambda needs TWO types of permissions:
|
|
47
|
+
- Execution role: what the function CAN DO (call S3, DynamoDB)
|
|
48
|
+
- Resource policy: who can INVOKE the function (API GW, S3 events)
|
|
49
|
+
4. Policy changes take a few seconds to propagate
|
|
50
|
+
|
|
51
|
+
Task: Explain Lambda IAM debugging. Write: how to read AccessDenied
|
|
52
|
+
errors (they tell you exactly what's missing), the execution role
|
|
53
|
+
vs resource policy distinction, principle of least privilege for
|
|
54
|
+
Lambda, common IAM mistakes, and how to test permissions.
|
|
55
|
+
|
|
56
|
+
assertions:
|
|
57
|
+
- type: llm_judge
|
|
58
|
+
criteria: "IAM error reading is explained — AccessDenied errors include: the principal (Lambda execution role ARN), the action attempted (s3:GetObject), and the resource ARN. This tells you exactly what permission to add. Two permission types: execution role (attached IAM role — what Lambda can do: read S3, write DynamoDB, publish SNS) and resource-based policy (who can invoke Lambda: API Gateway, S3 event notifications, CloudWatch Events). Both must be correct"
|
|
59
|
+
weight: 0.35
|
|
60
|
+
description: "IAM error reading"
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Common mistakes and fixes are covered — overly broad permissions (s3:* on Resource: * is dangerous). Always specify exact actions and resource ARNs. Forgetting to add AWSLambdaBasicExecutionRole (needed for CloudWatch Logs). VPC Lambda needs AWSLambdaVPCAccessExecutionRole. Policy propagation delay (wait a few seconds after policy changes). KMS permissions needed when using encrypted resources. Cross-account access requires both resource policy and execution role permissions"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "Common mistakes"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Testing and best practices are practical — test permissions: aws iam simulate-principal-policy. Use AWS IAM Access Analyzer to identify overly permissive policies. Start with no permissions, add as needed (least privilege). Use managed policies for common patterns (AmazonDynamoDBReadOnlyAccess). CloudTrail logs every API call — search for AccessDenied events. Use IAM policy conditions for additional security (restrict by source IP, time, VPC). Tag Lambda roles for identification"
|
|
67
|
+
weight: 0.30
|
|
68
|
+
description: "Testing and practices"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: invocation-errors
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda invocation errors — diagnose throttling, concurrency limits, and invocation type differences (sync vs async)"
|
|
7
|
+
tags: [AWS, Lambda, invocation, throttling, concurrency, sync-async, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function starts returning errors during a traffic spike:
|
|
13
|
+
|
|
14
|
+
$ aws lambda invoke --function-name process-order output.json
|
|
15
|
+
{
|
|
16
|
+
"StatusCode": 429,
|
|
17
|
+
"FunctionError": "Unhandled"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
$ cat output.json
|
|
21
|
+
{
|
|
22
|
+
"errorType": "TooManyRequestsException",
|
|
23
|
+
"errorMessage": "Rate exceeded"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
CloudWatch metrics show:
|
|
27
|
+
- Throttles: 1,500 (these are rejected requests!)
|
|
28
|
+
- ConcurrentExecutions: 1,000 (account limit)
|
|
29
|
+
- Errors: 200 (actual function errors)
|
|
30
|
+
- Invocations: 8,300
|
|
31
|
+
|
|
32
|
+
The account has a default concurrency limit of 1,000 across ALL
|
|
33
|
+
Lambda functions. Your function is consuming 800 concurrent
|
|
34
|
+
executions, starving other functions.
|
|
35
|
+
|
|
36
|
+
Important: Throttles are NOT counted in Invocations or Errors
|
|
37
|
+
metrics! You must monitor the Throttles metric separately.
|
|
38
|
+
|
|
39
|
+
Understanding invocation types:
|
|
40
|
+
|
|
41
|
+
Synchronous (RequestResponse):
|
|
42
|
+
- API Gateway, CLI invoke, SDK invoke
|
|
43
|
+
- Caller waits for response
|
|
44
|
+
- Throttled: returns 429 immediately
|
|
45
|
+
- Errors: returned to caller
|
|
46
|
+
|
|
47
|
+
Asynchronous (Event):
|
|
48
|
+
- S3 events, SNS, EventBridge
|
|
49
|
+
- Caller gets 202 Accepted immediately
|
|
50
|
+
- Lambda retries twice on failure
|
|
51
|
+
- Throttled: Lambda retries with backoff for up to 6 hours
|
|
52
|
+
- Failed after retries: sent to DLQ or destination
|
|
53
|
+
|
|
54
|
+
Task: Explain Lambda invocation debugging. Write: synchronous vs
|
|
55
|
+
asynchronous invocation differences, throttling (what it is, how
|
|
56
|
+
to detect, how to fix), concurrency limits (account vs function
|
|
57
|
+
reserved), the retry behavior for each invocation type, and how
|
|
58
|
+
to monitor invocation health.
|
|
59
|
+
|
|
60
|
+
assertions:
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Invocation types are explained — synchronous: caller waits, gets response or error. Used by API Gateway, CLI, SDK. Asynchronous: caller gets 202 immediately, Lambda processes in background. Used by S3, SNS, EventBridge. Lambda retries async failures twice (3 total attempts). Poll-based: Lambda polls event source (SQS, Kinesis, DynamoDB Streams) — behaves differently for each. Understanding invocation type is critical because error handling, retry behavior, and throttling behavior differ for each"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "Invocation types"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Throttling and concurrency are covered — default account limit: 1,000 concurrent executions (can be increased via support). Throttling = requests rejected when concurrency limit reached. Throttles metric: must monitor separately (not counted in Invocations or Errors!). Reserved concurrency: guarantee capacity for a function (but limits it too). Provisioned concurrency: pre-warm environments for consistent latency. Fix throttling: request limit increase, use reserved concurrency to protect critical functions, implement backoff in callers, use SQS to buffer requests"
|
|
67
|
+
weight: 0.35
|
|
68
|
+
description: "Throttling and concurrency"
|
|
69
|
+
- type: llm_judge
|
|
70
|
+
criteria: "Monitoring and retry behavior are practical — monitor: Invocations, Errors, Throttles, Duration, ConcurrentExecutions. Set alarms on: Throttles > 0, Error rate > 5%, Duration approaching timeout. Retry behavior: sync — no automatic retry (caller must retry), async — 2 retries with exponential backoff, then DLQ/destination. SQS: retries based on visibility timeout, then DLQ. Kinesis/DynamoDB Streams: retries until record expires or succeeds (can block shard). Configure maxRetryAttempts and DLQ for each invocation pattern"
|
|
71
|
+
weight: 0.30
|
|
72
|
+
description: "Monitoring and retry"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: lambda-timeout-errors
|
|
3
|
+
level: 1
|
|
4
|
+
course: aws-lambda-debugging
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug Lambda timeout errors — diagnose why functions exceed their configured timeout and how to fix common timeout causes"
|
|
7
|
+
tags: [AWS, Lambda, timeout, duration, configuration, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your Lambda function fails with a timeout error:
|
|
13
|
+
|
|
14
|
+
$ aws lambda invoke --function-name process-order output.json
|
|
15
|
+
{
|
|
16
|
+
"StatusCode": 200,
|
|
17
|
+
"FunctionError": "Unhandled",
|
|
18
|
+
"ExecutedVersion": "$LATEST"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$ cat output.json
|
|
22
|
+
{
|
|
23
|
+
"errorMessage": "2024-12-01T10:00:00.000Z abc-123 Task timed out after 3.00 seconds"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
CloudWatch Logs:
|
|
27
|
+
START RequestId: abc-123 Version: $LATEST
|
|
28
|
+
2024-12-01T10:00:00.000Z abc-123 Connecting to database...
|
|
29
|
+
2024-12-01T10:00:03.000Z abc-123 Task timed out after 3.00 seconds
|
|
30
|
+
END RequestId: abc-123
|
|
31
|
+
REPORT RequestId: abc-123 Duration: 3001.45 ms
|
|
32
|
+
Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 65 MB
|
|
33
|
+
|
|
34
|
+
The function has a 3-second timeout (default) but the database
|
|
35
|
+
connection takes 4+ seconds on cold start. The function never
|
|
36
|
+
reaches the actual business logic.
|
|
37
|
+
|
|
38
|
+
Fix options:
|
|
39
|
+
1. Increase timeout: aws lambda update-function-configuration \
|
|
40
|
+
--function-name process-order --timeout 30
|
|
41
|
+
2. Optimize: connection pooling, move DB connection outside handler
|
|
42
|
+
3. Use RDS Proxy for faster connection establishment
|
|
43
|
+
|
|
44
|
+
But setting timeout too high is also a problem — if the function
|
|
45
|
+
hangs, you pay for the full duration (max 15 minutes).
|
|
46
|
+
|
|
47
|
+
Task: Explain Lambda timeout debugging. Write: what the timeout
|
|
48
|
+
error means, how to read the REPORT line (Duration, Billed Duration,
|
|
49
|
+
Memory), common timeout causes (DB connections, API calls, large
|
|
50
|
+
payloads), how to set appropriate timeouts, and the relationship
|
|
51
|
+
between Lambda timeout and API Gateway timeout (29 seconds max).
|
|
52
|
+
|
|
53
|
+
assertions:
|
|
54
|
+
- type: llm_judge
|
|
55
|
+
criteria: "Timeout mechanics are explained — Lambda timeout is configurable (default 3 seconds, max 15 minutes). When exceeded, Lambda kills the execution and returns a Task timed out error. The REPORT line shows: Duration (actual execution time), Billed Duration (rounded up to nearest ms or 1ms minimum), Memory Size (configured), Max Memory Used (peak). Billed for full timeout duration if it times out. CloudWatch Logs show what happened before timeout"
|
|
56
|
+
weight: 0.35
|
|
57
|
+
description: "Timeout mechanics"
|
|
58
|
+
- type: llm_judge
|
|
59
|
+
criteria: "Common causes and fixes are covered — database connections on cold start (use connection pooling, RDS Proxy, initialize outside handler for reuse), external API calls without timeout (always set HTTP timeout shorter than Lambda timeout), large S3 file processing (stream instead of loading entirely into memory), cold start initialization (heavy imports, large packages). Set Lambda timeout slightly higher than expected max duration. API Gateway has a hard 29-second limit — Lambda behind API GW must complete within 29s"
|
|
60
|
+
weight: 0.35
|
|
61
|
+
description: "Causes and fixes"
|
|
62
|
+
- type: llm_judge
|
|
63
|
+
criteria: "Best practices are practical — set timeout based on p99 duration + buffer (not arbitrary large values). Monitor with CloudWatch Duration metric. Alert when duration approaches timeout. Use X-Ray to identify slow segments. Move initialization code outside handler (runs once per cold start, reused on warm invocations). Set HTTP client timeouts shorter than Lambda timeout to get a proper error instead of Lambda timeout. For long-running tasks: use Step Functions, SQS, or async invocation instead of increasing Lambda timeout"
|
|
64
|
+
weight: 0.30
|
|
65
|
+
description: "Best practices"
|