aws-lambda
Audited by Runlayer on Mar 12, 2026
Tool passed security scan
Risky tool definition detected
Risky tool definition detected
**Python:** ```python from aws_lambda_powertools import Metrics from aws_lambda_powertools.metrics import MetricUnit metrics = Metrics() # Reads POWERTOOLS_METRICS_NAMESPACE from env @metrics.log_metrics(capture_cold_start_metric=True) def handler(event, context): metrics.add_dimension(name="environment", value="prod") metrics.add_metric(name="OrdersProcessed", unit=MetricUnit.Count, value=1) metrics.add_metric(name="OrderTotal", unit=MetricUnit.Count, value=event["total"]) ``` **TypeScript:** `
Tool passed security scan
Risky tool definition detected
### Auth Best Practices - [ ] Use JWT authorizers with HTTP API for most web applications — cheapest, lowest latency - [ ] Cache Lambda authorizer results (`ReauthorizeEvery` > 0) to avoid per-request invocations - [ ] Never use API keys as the sole authentication mechanism — they are for usage tracking, not identity - [ ] Use IAM authorization (SigV4) for service-to-service calls, not shared API keys - [ ] Store JWT client IDs and secrets in SSM Parameter Store, not in template literals ## Perf
Tool passed security scan
Risky tool definition detected
Access to sensitive data (like Lambda and API Gateway logs) is **not** enabled by default.
Tool passed security scan
Risky tool definition detected
without a Lambda wrapper for simple operations - **Enable X-Ray tracing** (`Tracing.Enabled: true`) for end-to-end visibility across Step Functions and Lambda spans - **Set logging to `Level: ERROR` in production** and `Level: ALL` when debugging; `IncludeExecutionData: true` is required to see input/output in logs - **Standard workflows**: prefer for non-idempotent operations — exactly-once semantics prevent accidental double-charges or duplicate records - **Express workflows**: ensure downstre
Tool passed security scan
Risky tool definition detected
**Resolution options (choose one):** - Add VPC gateway endpoints for DynamoDB and S3 (free, recommended) - Add VPC interface endpoints for other services (per-hour + per-GB cost) - Add NAT Gateway in public subnet (higher cost, required for internet access) - **Use IPv6 + Egress-Only Internet Gateway** for internet access — Lambda now supports IPv6, so if your VPC has IPv6 CIDR blocks and an Egress-Only Internet Gateway, Lambda functions can reach the internet without a NAT Gateway, eliminating
Risky tool definition detected
Tool passed security scan
Risky tool definition detected
### API Gateway REST API — Enable Streaming API Gateway REST API response streaming requires two changes in your OpenAPI definition: 1.
Tool passed security scan
Tool passed security scan
Tool passed security scan
Passed Files (1)Click to expand
Tool passed security scan