[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A9DSC8AJ815Y2G9ECFJFRR":3,"skill-same:01M7A9DSC8AJ815Y2G9ECFJFRR":143},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M7A9DSC8AJ815Y2G9ECFJFRR","kinesis-firehose-troubleshooter",null,"Diagnoses Amazon Kinesis Data Firehose delivery stream failures via a systematic 8-symptom decision tree: delivery to S3 fails (bucket deleted, KMS key policy, bucket region mismatch), data transformation Lambda fails (Lambda timeout, exception, resource policy), delivery lag (buffering hints too large, Lambda slow, throttling), data format conversion fails (incorrect JSON, Hive SerDe mismatch for Parquet\u002FORC), delivery to OpenSearch fails (cluster unreachable, auth failure, circuit breaker), delivery to Redshift fails (COPY command failure, staging bucket issue), and latest destinations (Firehose to Snowflake, HTTP endpoint, Splunk delivery). Maps each symptom to root cause via diagnostic commands and specific fixes. Emits ROOT_CAUSE_FOUND with a fix plan, NEED_MORE_INFO with the next diagnostic, or ESCALATE with the escalation path. Use when Firehose is failing to deliver, lagging, transforming incorrectly, or a downstream destination returns errors.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: kinesis-firehose-troubleshooter\ndescription: 'Diagnoses Amazon Kinesis Data Firehose delivery stream failures via a systematic 8-symptom decision tree: delivery to S3 fails (bucket deleted, KMS key policy, bucket region mismatch), data transformation Lambda fails (Lambda timeout, exception, resource policy), delivery lag (buffering hints too large, Lambda slow, throttling), data format conversion fails (incorrect JSON, Hive SerDe mismatch for Parquet\u002FORC), delivery to OpenSearch fails (cluster unreachable, auth failure, circuit breaker), delivery to Redshift fails (COPY command failure, staging bucket issue), and latest destinations (Firehose to Snowflake, HTTP endpoint, Splunk delivery). Maps each symptom to root cause via diagnostic commands and specific fixes. Emits ROOT_CAUSE_FOUND with a fix plan, NEED_MORE_INFO with the next diagnostic, or ESCALATE with the escalation path. Use when Firehose is failing to deliver, lagging, transforming incorrectly, or a downstream destination returns errors.'\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline diagnosis. Live- account troubleshooting uses aws firehose describe-delivery- stream, list-tags-for-stream, list-delivery-streams, start- delivery-stream-encryption, stop-delivery-stream-encryption, aws logs filter-log-events, aws lambda get-function, get-policy, invoke, aws s3api head-bucket, get-bucket-location, aws opensearch describe-domain, describe-domain-health, aws...\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '2'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Analytics\n  task_type: troubleshoot\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\n  when_to_use: 'Diagnosing a Kinesis Data Firehose delivery stream that is failing to deliver, lagging, transforming incorrectly, or one of the downstream destinations returns errors. Covers the eight primary symptom categories: delivery to S3 fails, data transformation Lambda fails, delivery lag, data format conversion fails (Parquet\u002FORC), delivery to OpenSearch fails, delivery to Redshift fails, and latest destinations (Firehose to Snowflake, HTTP endpoint, Splunk). Use when CloudWatch shows DeliveryToS3.Success dropping, Firehose logs show Lambda transformation errors, ORC\u002FParquet conversion produces 0-byte objects, the OpenSearch destination returns 429s, or the Redshift COPY command fails.'\n  activation_triggers: Firehose delivery fails, Firehose delivery lag, Firehose to S3 fails, Firehose to OpenSearch fails, Firehose to Redshift fails, Firehose to Snowflake fails, Firehose HTTP endpoint fails, Firehose Splunk delivery fails, Firehose Lambda transformation fails, DeliveryToS3.Success drops, DeliveryToS3.DataFreshnessSec high, data format conversion fails, Parquet conversion 0 bytes, ORC SerDe mismatch, Firehose circuit breaker, OpenSearch 429, Redshift COPY fails, Splunk HEC token invalid, Firehose KMS denied, bucket region mismatch\n  invocation_schema: 'Input: either (a) a delivery-stream-name with observed symptom (delivery-to-s3-fails \u002F lambda-fails \u002F delivery-lag \u002F format-conversion-fails \u002F opensearch-fails \u002F redshift-fails \u002F latest-destination-fails), optionally with a destination type (s3 \u002F opensearch \u002F redshift \u002F snowflake \u002F http-endpoint \u002F splunk), OR (b) live-account diagnostic output from describe-delivery-stream, get-metric-statistics, filter-log- events, etc. Output: deterministic DIAGNOSIS block per stream - SYMPTOM\u002FROOT_CAUSE\u002FEVIDENCE\u002FLAYER_CHECK\u002FFIX\u002F VERDICT - where VERDICT is ROOT_CAUSE_FOUND (cause identified + fix actionable), NEED_MORE_INFO (specific next diagnostic cited), or ESCALATE (requires AWS Support or out-of-band action).'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: Kinesis, Kinesis Data Firehose, delivery stream, delivery to S3 fails, delivery lag, data transformation Lambda, Lambda processing, data format conversion, Parquet, ORC, Hive SerDe, OpenSearch delivery, Redshift COPY, Snowflake delivery, HTTP endpoint delivery, Splunk HEC, circuit breaker, buffering hints, KMS key policy, staging bucket\n  tags: kinesis, firehose, analytics, troubleshoot, delivery-stream, lambda, opensearch, redshift, diagnostic\n---\n\n# Kinesis Data Firehose Troubleshooter\n\n## Mindset\n\nA Firehose delivery stream is a four-stage pipeline: **ingest**\n(the PutRecord API or Kinesis Stream source), **transform**\n(optional Lambda processing), **convert** (optional format\nconversion to Parquet\u002FORC via Glue catalog), and **deliver**\n(the destination: S3, OpenSearch, Redshift, Snowflake, HTTP\nendpoint, Splunk). Most \"Firehose failing\" tickets are one stage\nfailing silently while the others report healthy. Diagnose the\nstage first, then the destination-specific config.\n\n- **The 5-layer health check is the upstream gate.** Firehose does not surface all failures as delivery-stream `ACTIVE` status changes; a Lambda transform or destination can fail while the stream stays green. Diagnose by layer: source, transform, convert, deliver, observability.\n- **CloudWatch metrics are per-destination.** `DeliveryToS3.Success`, `DeliveryToOpenSearch.Success`, `DeliveryToRedshift.Success` are separate metrics. Verify the metric matching the configured destination, not just `DeliveryToS3.Success`.\n- **`describe-delivery-stream` is the source of truth.** It returns the full destination config, Lambda ARN, buffering hints, and the S3 backup bucket. The console shows a summary; the API returns the exact JSON the service is using.\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Run the 5-layer health check first (recommended) | Step 1 |\n| Diagnose delivery to S3 fails | Step 2 |\n| Diagnose data transformation Lambda fails | Step 3 |\n| Diagnose delivery lag (high DataFreshness) | Step 4 |\n| Diagnose data format conversion fails (Parquet\u002FORC) | Step 5 |\n| Diagnose delivery to OpenSearch fails | Step 6 |\n| Diagnose delivery to Redshift fails | Step 7 |\n| Diagnose latest destinations (Snowflake \u002F HTTP \u002F Splunk) | Step 8 |\n| Map symptom to root cause quickly | Appendix A |\n| Avoid misdiagnosis pitfalls | Anti-Patterns |\n\n## STRICT output contract\n\nEvery diagnosis MUST emit the exact DIAGNOSIS block with all fields\npopulated (no empty fields, no omitted sections, no reordering).\nAll five LAYER_CHECK lines (Source, Transform, Convert, Deliver,\nObservability) are mandatory - even when the failure is destination-\nspecific.\n\nVerdict-specific rules:\n- `ROOT_CAUSE_FOUND` -> ROOT_CAUSE names a single specific cause; EVIDENCE cites at least one failing API signal or metric; FIX is actionable CLI.\n- `NEED_MORE_INFO` -> ROOT_CAUSE is \"Pending diagnosis - \u003Cwhat is known>\"; NEXT_STEP cites the exact next command.\n- `ESCALATE` -> ESCALATION_PATH names the recipient and the out-of-band action required.\n\n```text\nDIAGNOSIS: \u003Creference>\nDELIVERY_STREAM: \u003Cstream-name>\nDESTINATION: \u003Cs3 | opensearch | redshift | snowflake | http-endpoint | splunk | lambda>\nSYMPTOM: DeliveryToS3Fails | LambdaFails | DeliveryLag | FormatConversionFails | OpenSearchFails | RedshiftFails | LatestDestinationFails\nROOT_CAUSE: \u003Cspecific cause cited>\nEVIDENCE:\n  - \u003Cdiagnostic signal 1>\n  - \u003Cdiagnostic signal 2>\nLAYER_CHECK:\n  - Source: \u003CPASS | FAIL - reason>\n  - Transform: \u003CPASS | FAIL - reason | N\u002FA>\n  - Convert: \u003CPASS | FAIL - reason | N\u002FA>\n  - Deliver: \u003CPASS | FAIL - reason>\n  - Observability: \u003CPASS | FAIL - reason>\nFIX:\n  - \u003Caction 1 with CLI snippet>\n  - \u003Caction 2 ...>\nVERIFICATION:\n  - \u003Ccommand to confirm fix>\nVERDICT: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\nNEXT_STEP: \u003Cif NEED_MORE_INFO, the specific next diagnostic>\nESCALATION_PATH: \u003Cif ESCALATE, the recommended path>\n```\n\n## Critical rules at a glance\n\n1. **Run the 5-layer health check FIRST.** Before any destination-specific diagnosis, confirm: (1) source is feeding records, (2) Lambda transform (if any) is not erroring, (3) format conversion (if any) is producing non-zero output, (4) destination is reachable and accepting writes, (5) CloudWatch logging is enabled so you have evidence.\n2. **Verify the per-destination metric.** `DeliveryToS3.Success` is irrelevant when the destination is OpenSearch. Use the metric matching the configured destination.\n3. **`describe-delivery-stream` returns the live config.** The console may lag or show stale state; the API returns the actual JSON Firehose is using.\n4. **Lambda transforms cap output at 6 MB.** A record that grows during transformation (enrichment, JSON expansion) can exceed the cap and be dropped silently to S3 backup.\n5. **DataFreshness is the lag indicator.** A spike in `DeliveryToS3.DataFreshnessSec` means the destination is not keeping up with ingestion. Buffering hints and Lambda duration are the usual culprits.\n\n## NEVER (top 5)\n\n- **NEVER** diagnose a Firehose failure without first running the 5-layer health check. Most \"delivery fails\" tickets are coverage gaps in the transform Lambda, the KMS key policy, or the destination reachability.\n- **NEVER** assume the delivery-stream status `ACTIVE` means records are being delivered. `ACTIVE` only means the stream config is accepted; per-record delivery failures are surfaced via CloudWatch metrics and S3 backup, not status.\n- **NEVER** confuse a Lambda transform timeout with a Firehose bug. Firehose invokes the transform with the configured buffer (1-3 MB or 60-900 sec); a Lambda slower than the buffer cadence produces backpressure, not a Firehose failure.\n- **NEVER** assume Parquet\u002FORC conversion is working because objects land in S3. Conversion can produce 0-byte objects if the input JSON is malformed or the Glue table schema does not match the data. Always verify object size, not just object count.\n- **NEVER** emit `VERDICT: NEED_MORE_INFO` without a `NEXT_STEP` naming a specific diagnostic command. Generic phrases like \"investigate further\" are not acceptable.\n\n## Expert heuristic\n\n- If `DeliveryToS3.Success` drops to 0 instantly after a config change, the failure is **IAM, KMS, or bucket policy** (Step 2). Check CloudTrail for `AccessDenied` on `s3:PutObject` or `kms:GenerateDataKey`.\n- If `DeliveryToS3.DataFreshnessSec` spikes without a drop in `Success`, the failure is **buffering hints or Lambda duration** (Step 4). The destination eventually catches up; data is just delayed.\n- If Parquet objects land but query engines return empty results, the failure is **SerDe \u002F Glue schema mismatch** (Step 5). The bytes are written but unreadable.\n- If only OpenSearch destination fails with `429 Too Many Requests`, the failure is **OpenSearch write throttling** or the Firehose circuit breaker (default: 5 minutes of sustained writes). Scale the OpenSearch cluster or raise the circuit-breaker window.\n- If Redshift COPY fails consistently at the same step, the failure is **column-count mismatch, encoding, or the staging-bucket IAM grant** (Step 7). Look in `STL_LOAD_ERRORS`.\n- If Snowflake \u002F HTTP endpoint \u002F Splunk destinations fail, the failure is usually **credentials, network reachability, or the endpoint's auth model** (Step 8) - these do not exercise S3 KMS or Lambda layers.\n\n## Pre-flight: data requirements\n\n> **Moved verbatim** → [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) § \"Pre-flight: data requirements\".\n> Load when: starting a diagnosis — the required-inputs table and the malformed-input NEED_MORE_INFO block.\n\n## Process - Diagnostic decision tree (apply in order)\n\n### Step 0: Expert knowledge - non-obvious Firehose behaviors\n\n> **Moved verbatim** → [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) § \"Step 0: Expert knowledge - non-obvious Firehose behaviors\".\n> Load when: a behavior seems non-obvious — buffered Lambda invocation, 6 MB response cap, OpenSearch circuit breaker, staging-bucket IAM, update-destination VersionId.\n\n### Step 1: The 5-layer Firehose health check (run FIRST)\n\nBefore any destination-specific diagnosis, confirm all five layers.\nA failing layer invalidates all downstream diagnosis.\n\n**Layer 1 - Source (records are arriving):**\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.[DeliveryStreamStatus,DeliveryStreamType,Source.KinesisStreamSourceConfiguration]' --output table\naws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose \\\n  --metric-name IncomingBytes --dimensions Name=DeliveryStreamName,Value=\u003Cstream-name> \\\n  --start-time $(date -u -v-15M +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Sum --output table\n```\n\nFor Kinesis-stream source, also verify the source stream is alive:\n\n```bash\naws kinesis describe-stream-summary --stream-name \u003Csource-stream-name> \\\n  --query 'StreamDescriptionSummary.[StreamStatus,RetentionPeriodHours,OpenShardCount]' --output table\n```\n\n**Layer 2 - Transform (Lambda is not erroring):**\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].\u003Cdestination-block>.ProcessingConfiguration' --output table\naws cloudwatch get-metric-statistics --namespace AWS\u002FLambda \\\n  --metric-name Errors --dimensions Name=FunctionName,Value=\u003Clambda-function-name> \\\n  --start-time $(date -u -v-15M +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Sum --output table\naws logs filter-log-events --log-group-name \u002Faws\u002Flambda\u002F\u003Clambda-function-name> \\\n  --filter-pattern \"ERROR\" --start-time $(date -u -v-15M +%s)000 --output table\n```\n\n**Layer 3 - Convert (format conversion producing non-zero output):**\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].ExtendedS3DestinationDescription.DataFormatConversionConfiguration' --output table\naws s3api list-objects-v2 --bucket \u003Cbucket> --prefix \u003Cprefix> \\\n  --query 'Contents[*].[Key,Size,LastModified]' --output table | head -20\n```\n\n**Layer 4 - Deliver (destination reachable and accepting writes):**\n\n```bash\naws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose \\\n  --metric-name \u003CDeliveryToS3|DeliveryToOpenSearch|DeliveryToRedshift>.Success \\\n  --dimensions Name=DeliveryStreamName,Value=\u003Cstream-name> \\\n  --start-time $(date -u -v-15M +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Average --output table\n```\n\nFor OpenSearch, also verify domain health:\n\n```bash\naws opensearch describe-domain-health --domain-name \u003Cdomain-name> \\\n  --query 'DomainStatus.[ClusterConfig.DedicatedMasterEnabled,ClusterConfig.InstanceType,ClusterHealth] ' --output table\n```\n\n**Layer 5 - Observability (logging is enabled):**\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].\u003Cdestination-block>.CloudWatchLoggingOptions' --output table\naws logs describe-log-groups --log-group-name-prefix \u002Faws\u002Fkinesisfirehose\u002F\u003Cstream-name> --output table\n```\n\nFlags: `Enabled: false` on CloudWatch logging means you are blind\nto per-record errors. Enable before debugging further.\n\n**If any layer fails, fix the layer FIRST.** Most Firehose failures\nresolve when logging, IAM, or KMS is restored. Specifically:\n- Layer 1 fails -> source stream paused or no PutRecord traffic.\n- Layer 2 fails -> Lambda errors or timeouts; check Lambda logs.\n- Layer 3 fails -> Glue schema mismatch or non-JSON input; check object size.\n- Layer 4 fails -> destination unreachable, IAM gap, or KMS denial.\n- Layer 5 fails -> CloudWatch logging disabled; enable before continuing.\n\n### Step 2: Diagnose delivery to S3 fails\n\n**Symptom:** `DeliveryToS3.Success` drops below 100% or objects\nstop landing in the S3 bucket.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].ExtendedS3DestinationDescription.[BucketARN,RoleARN,BufferingHints,EncryptionConfiguration]' --output table\naws s3api head-bucket --bucket \u003Cbucket-name>\naws s3api get-bucket-location --bucket \u003Cbucket-name>\naws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=PutObject \\\n  --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --query 'Events[*].[EventTime,Username,ResourceName]' --output table | grep -i \u003Cbucket>\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Bucket deleted | `head-bucket` returns `404` \u002F `NoSuchBucket` | Recreate the bucket; or update-destination to a new bucket |\n| Bucket region mismatch | `get-bucket-location` returns a region other than the Firehose region | Move the bucket to the Firehose region; cross-region S3 is not supported |\n| KMS key disabled \u002F rotated | `kms describe-key` shows `KeyState: Disabled` or `PendingDeletion` | Re-enable or recreate the key; update `EncryptionConfiguration.KMSEncryptionConfig` |\n| KMS key policy denies Firehose | `get-key-policy` does not grant `kms:GenerateDataKey` to `delivery.stream.amazonaws.com` | Add a statement allowing `kms:GenerateDataKey`, `kms:Decrypt` for `ServicePrincipal: firehose.amazonaws.com` |\n| Bucket policy denies Firehose role | Bucket policy `Statement` lacks `s3:PutObject` for the Firehose role ARN | Add `s3:PutObject`, `s3:AbortMultipartUpload`, `s3:ListBucketMultipartUploads` to the bucket policy |\n| Firehose role lacks `s3:PutObject` | `simulate-principal-policy` returns `Denied` for `s3:PutObject` on the bucket | Attach \u002F extend the Firehose role policy |\n| Object prefix has invalid characters | Prefix contains `\u002F\u002F`, leading `\u002F`, or forbidden chars | Fix the prefix in `update-destination` |\n| Multipart upload never completed | Object key fragments in `_InProgress\u002F`; `CompleteMultipartUpload` denied | Add `s3:CompleteMultipartUpload`; check S3 lifecycle for `_ABORTED_` |\n\n**VERDICT:** ROOT_CAUSE_FOUND when CloudTrail \u002F IAM check\nidentifies a specific cause; NEED_MORE_INFO when the bucket and\nIAM are correct but writes still fail (capture CloudTrail for the\nexact `errorMessage`).\n\n### Step 3: Diagnose data transformation Lambda fails\n\n**Symptom:** `DeliveryToS3.Success` is healthy but transformed\nrecords are wrong, dropped to S3 backup, or Lambda errors spike.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].\u003Cdestination-block>.ProcessingConfiguration' --output table\naws lambda get-function --function-name \u003Clambda-function-name> \\\n  --query 'Configuration.[Runtime,Timeout,MemorySize,Role]' --output table\naws lambda get-policy --function-name \u003Clambda-function-name> --query 'Policy' --output text\naws logs filter-log-events --log-group-name \u002Faws\u002Flambda\u002F\u003Clambda-function-name> \\\n  --filter-pattern \"ERROR Task timed out\" --start-time $(date -u -v-1H +%s)000 --output table\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Lambda timeout | CloudWatch `Duration` near `Timeout`; log shows \"Task timed out after X seconds\" | Increase Lambda `Timeout` (max 900s); or reduce buffer size |\n| Lambda exception | Log shows stack trace; `Errors` metric > 0 | Fix the handler code; common causes: JSON parse, missing field, ref-data fetch failure |\n| Lambda response > 6 MB | S3 backup receives full batches; log shows \"response payload exceeds 6 MB\" | Reduce buffer size; or compress \u002F trim records in the handler |\n| Lambda resource policy lacks Firehose invoke | `get-policy` lacks `lambda:InvokeFunction` for `firehose.amazonaws.com` | Add `lambda:InvokeFunction` permission with principal `firehose.amazonaws.com`, source-arn = stream ARN |\n| Lambda role lacks downstream access | Logs show `AccessDenied` on DynamoDB \u002F S3 ref-data | Attach the required actions to the Lambda role |\n| Lambda runtime deprecated | `Runtime: nodejs14.x` or `python3.7`; deprecation warning | Upgrade to a supported runtime (nodejs20.x, python3.12) |\n| Lambda concurrency limit hit | CloudWatch `Throttles` > 0 | Raise reserved \u002F account concurrency; or reduce buffer flush rate |\n| Mismatched buffer vs Lambda duration | Buffer flush every 60s but Lambda `Timeout: 30s` for a 50 MB batch | Reduce buffer size or raise Lambda `Timeout` |\n| Lambda returns malformed response | Log shows \"Invalid output format\" | Return `{ records: [{ recordId, result: 'Ok', data: base64 }], ... }` exactly per the Firehose transform protocol |\n\n**VERDICT:** ROOT_CAUSE_FOUND when Lambda log identifies a specific\ncause; NEED_MORE_INFO when Lambda errors are intermittent (sample\nthe handler code or ref-data source).\n\n### Step 4: Diagnose delivery lag (high DataFreshness)\n\n**Symptom:** `DeliveryToS3.DataFreshnessSec` spikes; records land\nin S3 minutes or hours late.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].\u003Cdestination-block>.BufferingHints' --output table\naws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose \\\n  --metric-name DeliveryToS3.DataFreshnessSec \\\n  --dimensions Name=DeliveryStreamName,Value=\u003Cstream-name> \\\n  --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Average,Maximum --output table\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Buffering hints too large | `BufferingHints.SizeInMBs: 128` and `IntervalInSeconds: 900`; low-traffic stream | Reduce `SizeInMBs` to 5-10 or `IntervalInSeconds` to 60-300 |\n| Lambda processing slow | Lambda `Duration` consistently > buffer flush interval | Increase Lambda memory (proportional CPU); parallelize processing; or reduce buffer size |\n| Firehose throttled on `PutRecord` | Source-side `ThrottledRecords` > 0; `WriteThroughputBytes` flat | Request a limit increase; or shard the stream |\n| Destination backpressure (OpenSearch 429) | OpenSearch `429` count > 0 in Firehose logs; circuit breaker engaged | Scale OpenSearch cluster; raise Firehose `IndexRotationPeriod` |\n| KMS throttling | KMS `ThrottledRequests` > 0 | Request KMS RPS limit increase; or use AWS managed key |\n| S3 503 Slow Down | S3 `5xx` rate elevated; `CompleteMultipartUpload` latency up | Use a higher-cardinality prefix; reduce PUT rate per partition |\n| Network path latency | Cross-AZ or cross-region hops (VPN \u002F PrivateLink) | Co-locate Firehose and destination in the same region and AZ group |\n\n**VERDICT:** ROOT_CAUSE_FOUND when metric correlation identifies a\nspecific cause; NEED_MORE_INFO when DataFreshness spikes are\nintermittent and uncorrelated with any single metric (instrument\nper-stage timing in the Lambda transform).\n\n### Step 5: Diagnose data format conversion fails (Parquet\u002FORC)\n\n**Symptom:** objects land in S3 but Athena \u002F engines return empty\nor 0-byte objects; `DeliveryToS3.Success` shows healthy.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].ExtendedS3DestinationDescription.DataFormatConversionConfiguration' --output table\naws glue get-table --database-name \u003Cdb> --name \u003Ctable> \\\n  --query 'Table.[StorageDescriptor.Columns,Parameters]' --output table\naws s3api head-object --bucket \u003Cbucket> --key \u003Cprefix>\u002F\u003Clatest-object> --query 'ContentLength' --output text\naws logs filter-log-events --log-group-name \u002Faws\u002Fkinesisfirehose\u002F\u003Cstream-name> \\\n  --filter-pattern \"FormatConversion\" --output table\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Input not valid JSON | Firehose log: \"Input record is not valid JSON\"; records to S3 error backup | Fix the producer to emit JSON; or change deserializer to OpenXJsonSerDe with tolerance |\n| Glue schema mismatch | `get-table` columns do not match JSON keys; Athena returns nulls | Update the Glue table schema to match the data; or fix the producer |\n| Hive SerDe mismatch (ORC vs Parquet) | OutputFormat set to ORC but writer config is Parquet; or vice versa | Align `OutputFormatConfiguration.Format` with the Glue table `TableType` and SerDe |\n| Timestamp format wrong | Athena returns nulls on `timestamp` columns; Firehose log: \"Invalid timestamp\" | Add `TimestampFormats` to the SerDe (e.g., `yyyy-MM-dd HH:mm:ss.SSSSSS`) |\n| Case sensitivity mismatch | JSON keys `snake_case` but Glue columns `CamelCase` | Set `CaseInsensitive` on the SerDe or rename Glue columns |\n| Nested object not parsed | Glue `struct` type but input is a string-encoded JSON | Add `Mapping` or use a different SerDe; or pre-parse in Lambda transform |\n| 0-byte objects | `head-object ContentLength: 0` | Conversion rejected the whole batch; check the S3 error backup and the Glue schema |\n| Unsupported SerDe (CSV) | `InputFormatConfiguration.Deserializer` is `LazySimpleSerDe` (CSV) but output is Parquet | Use `OpenXJsonSerDe` for JSON-only inputs to Parquet\u002FORC conversion |\n\n**VERDICT:** ROOT_CAUSE_FOUND when Glue schema vs input diff\nidentifies a specific cause; NEED_MORE_INFO when input is valid\nJSON and schema matches but conversion still fails (sample a\nrecord from the source and run it through the Glue crawler).\n\n### Step 6: Diagnose delivery to OpenSearch fails\n\n**Symptom:** `DeliveryToOpenSearch.Success` drops below 100%;\nOpenSearch index missing recent documents.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].AmazonopensearchserviceDestinationDescription.[DomainARN,IndexName,RoleARN,TypeName,S3BackupMode]' --output table\naws opensearch describe-domain --domain-name \u003Cdomain-name> \\\n  --query 'DomainStatus.[Endpoints,ClusterConfig.InstanceType,ClusterConfig.InstanceCount,EncryptionAtRestOptions.Enabled]' --output table\naws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose \\\n  --metric-name DeliveryToOpenSearch.Success \\\n  --dimensions Name=DeliveryStreamName,Value=\u003Cstream-name> \\\n  --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Average --output table\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Cluster unreachable | `describe-domain` shows `Endpoints: null` or processing; Firehose log: `Connection refused` | Wait for domain to finish processing; or check VPC endpoint reachability |\n| Auth failure - IAM | OpenSearch access policy does not allow the Firehose role | Add the Firehose role to the domain access policy with `es:ESHttpPost` |\n| Auth failure - basic | Domain uses master-user auth; Firehose not configured with correct credentials | Configure `ClusterEndpoint` + `Username`\u002F`Password` (Secrets Manager) |\n| Fine-grained access control (FGAC) | Firehose role lacks the backend role mapping | Map the Firehose role to the appropriate OpenSearch role via the security plugin |\n| OpenSearch 429 (Too Many Requests) | `429` count in Firehose logs; circuit breaker engaged | Scale the cluster (more \u002F larger instances); or shard the Firehose destination |\n| Circuit breaker tripped | Delivery resumes after sustained success; `Success: 0` for the breaker window | Same as 429; raise the breaker window via AWS Support if needed |\n| Index name invalid | Index name has uppercase or invalid char; `400 Bad Request` | Use lowercase, no special chars; use `IndexRotationPeriod` for time-based indices |\n| Document mapping conflict | Field type changes between records; OpenSearch rejects | Map fields explicitly in the index template; or use dynamic templates |\n| VPC OpenSearch without Firehose VPC config | Firehose in a different VPC; private network unreachable | Put Firehose in the same VPC as OpenSearch; or use a transit gateway |\n| KMS key policy (encryption-at-rest) | Key policy does not grant the Firehose role | Add `kms:GenerateDataKey`, `kms:Decrypt` for the Firehose role |\n| OpenSearch health yellow\u002Fred | `describe-domain-health` shows `Yellow`\u002F`Red` | Resolve shard allocation; free disk space; or restart unhealthy nodes |\n\n**VERDICT:** ROOT_CAUSE_FOUND when access policy \u002F OpenSearch\nhealth identifies a specific cause; NEED_MORE_INFO when auth is\ncorrect and the cluster is green but deliveries still fail\n(capture the exact HTTP response code from Firehose logs).\n\n### Step 7: Diagnose delivery to Redshift fails\n\n**Symptom:** `DeliveryToRedshift.Success` drops; Redshift tables\nmissing recent data.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].RedshiftDestinationDescription.[ClusterJDBCURL,CopyCommand,RoleARN,Username,S3Configuration]' --output table\naws redshift describe-clusters --cluster-identifier \u003Ccluster-id> \\\n  --query 'Clusters[0].[ClusterStatus,ClusterAvailabilityStatus,NodeType,NumberOfNodes]' --output table\naws logs filter-log-events --log-group-name \u002Faws\u002Fkinesisfirehose\u002F\u003Cstream-name> \\\n  --filter-pattern \"COPY\" --output table\n```\n\nConnect to Redshift and check the load errors:\n\n```sql\nSELECT query, filename, line_number, colname, type, err_reason\nFROM stl_load_errors\nWHERE start_time > dateadd(hour, -1, getdate())\nORDER BY start_time DESC LIMIT 20;\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Redshift cluster paused \u002F unavailable | `describe-clusters` shows `paused`, `available` with no active connections, or `resizing` | Resume the cluster; wait for resize; or use a Multi-AZ cluster |\n| JDBC URL unreachable | Firehose log: `Connection refused` | Verify the security group allows the Firehose subnet to TCP\u002F5439; or use Firehose-in-VPC |\n| Credentials invalid | Firehose log: `Authentication failed` | Update `Username` + `Password` (Secrets Manager); rotate |\n| COPY column mismatch | `stl_load_errors` shows `Extra column(s)` \u002F `Missing column(s)` | Align the `CopyCommand.DataTableColumns` with the table schema |\n| Encoding \u002F format invalid | `stl_load_errors` shows `Invalid digit, Value '.', ... ` | Fix the producer format; or set `COPY ... ACCEPTANYDATE` \u002F `TRIMBLANKS` \u002F `NULL AS` |\n| Staging bucket IAM gap | Firehose delivers to staging; COPY fails with `S3ServiceException: Access Denied` | Grant the **Redshift cluster role** (not Firehose role) `s3:GetObject` on the staging bucket |\n| Staging bucket deleted | `head-bucket` on staging bucket returns 404 | Recreate staging bucket; or `update-destination` to a new staging bucket |\n| Staging bucket region mismatch | Staging bucket in a different region than Redshift | Move staging bucket to the Redshift region |\n| COPY timeout | `stl_load_errors` shows large file; COPY duration > Firehose retry window | Split files (smaller Firehose buffer); or use `COPY ... MAXERROR 100` with monitoring |\n| Date \u002F timestamp format | `stl_load_errors` shows `Invalid timestamp format` | Set `COPY ... FORMAT AS CSV` and `timeformat AS 'YYYY-MM-DD HH:MI:SS'` |\n| KMS key for staging bucket | Redshift cluster role lacks `kms:Decrypt` on the staging bucket key | Add the Redshift cluster role to the staging bucket KMS key policy |\n\n**VERDICT:** ROOT_CAUSE_FOUND when `stl_load_errors` identifies a\nspecific cause; NEED_MORE_INFO when the COPY appears to succeed\nbut rows are missing (check the Redshift workload manager and\ntransaction commits).\n\n### Step 8: Diagnose latest destinations (Snowflake \u002F HTTP \u002F Splunk)\n\n> **Moved verbatim** → [references\u002Ffirehose-delivery-diagnostics.md](references\u002Ffirehose-delivery-diagnostics.md) § \"Step 8: Diagnose latest destinations (Snowflake \u002F HTTP \u002F Splunk)\".\n> Load when: diagnosing Snowflake, HTTP endpoint, or Splunk destinations — per-destination cause\u002Fsignal\u002Ffix tables.\n\n## Output format\n\nThe output block template above is the authoritative structure.\nViolating any rule is a misdiagnosis. Three worked examples follow.\n\n### Worked example - ROOT_CAUSE_FOUND, DeliveryToS3Fails (KMS gap)\n\n```text\nDIAGNOSIS: prod-firehose-s3\nDELIVERY_STREAM: prod-events-delivery\nDESTINATION: s3 (extended)\nSYMPTOM: DeliveryToS3Fails\nROOT_CAUSE: KMS key policy on arn:aws:kms:us-east-1:111111111111:key\u002Fabc123\n            does not grant the Firehose service principal\n            kms:GenerateDataKey. The key policy allows only the\n            customer account root.\nEVIDENCE:\n  - CloudTrail PutObject events for the Firehose role show errorMessage: \"AccessDenied: kms:GenerateDataKey on arn:aws:kms:us-east-1:111111111111:key\u002Fabc123\"\n  - aws kms get-key-policy: Statement Principal = {\"AWS\": \"arn:aws:iam::111111111111:root\"} only\nLAYER_CHECK:\n  - Source: PASS - IncomingBytes > 0; stream type DirectPut\n  - Transform: N\u002FA - no Lambda processing configured\n  - Convert: N\u002FA - no format conversion\n  - Deliver: FAIL - KMS key policy denies Firehose service principal\n  - Observability: PASS - CloudWatch logging enabled\nFIX:\n  - Add the Firehose service principal to the KMS key policy:\n    aws kms put-key-policy --key-id arn:aws:kms:us-east-1:111111111111:key\u002Fabc123 --policy-name default --policy '{\"Id\":\"firehose-key-policy\",\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Enable IAM permissions\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::111111111111:root\"},\"Action\":\"kms:*\",\"Resource\":\"*\"},{\"Sid\":\"Allow Firehose\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"firehose.amazonaws.com\"},\"Action\":[\"kms:GenerateDataKey\",\"kms:Decrypt\"],\"Resource\":\"*\"}]}'\n  - No Firehose-side change; the key policy is the only gap.\nVERIFICATION:\n  - aws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose --metric-name DeliveryToS3.Success --dimensions Name=DeliveryStreamName,Value=prod-events-delivery --start-time $(date -u -v-15M +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) --period 60 --statistics Average --output table\n  - Expect: Average >= 1.0 within 5-10 minutes of the key policy update.\nVERDICT: ROOT_CAUSE_FOUND\nNEXT_STEP: None\nESCALATION_PATH: None\n```\n\n### Worked example - NEED_MORE_INFO, DeliveryLag (intermittent)\n\n> **Moved verbatim** → [references\u002Fworked-examples.md](references\u002Fworked-examples.md) § \"Worked example - NEED_MORE_INFO, DeliveryLag (intermittent)\".\n> Load when: emitting a NEED_MORE_INFO verdict — intermittent DeliveryLag example with per-stage timing next steps.\n\n### Worked example - ESCALATE, OpenSearchFails (cluster red)\n\n> **Moved verbatim** → [references\u002Fworked-examples.md](references\u002Fworked-examples.md) § \"Worked example - ESCALATE, OpenSearchFails (cluster red)\".\n> Load when: emitting an ESCALATE verdict — OpenSearch cluster-red example with out-of-band remediation.\n\n## Anti-Patterns - NEVER do these things\n\n- NEVER diagnose a Firehose failure without first running the 5-layer health check. Most \"delivery fails\" tickets are coverage gaps in the transform Lambda, KMS key policy, or destination reachability.\n- NEVER assume the delivery-stream status `ACTIVE` means records are being delivered. `ACTIVE` only means the stream config is accepted; per-record delivery failures are surfaced via CloudWatch metrics and S3 backup, not status.\n- NEVER confuse a Lambda transform timeout with a Firehose bug. Firehose invokes the transform with the configured buffer; a Lambda slower than the buffer cadence produces backpressure, not a Firehose failure.\n- NEVER assume Parquet\u002FORC conversion is working because objects land in S3. Conversion can produce 0-byte objects if the input JSON is malformed or the Glue table schema does not match the data. Always verify object size, not just object count.\n- NEVER emit `VERDICT: NEED_MORE_INFO` without a `NEXT_STEP` naming a specific diagnostic command. Generic phrases like \"investigate further\" are not acceptable.\n\n## Pre-flight safety checks\n\n> **Moved verbatim** → [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) § \"Pre-flight safety checks\".\n> Load when: before any state-changing operation — confirmation gate, update-destination blast radius, KMS policy backup.\n\n## Appendix A - Symptom-to-cause map (quick reference)\n\n> **Moved verbatim** → [references\u002Ffirehose-delivery-diagnostics.md](references\u002Ffirehose-delivery-diagnostics.md) § \"Appendix A - Symptom-to-cause map (quick reference)\".\n> Load when: mapping a symptom to its most common root cause and the command that verifies it.\n\n## Recent AWS features (2024-2026)\n\n> **Moved verbatim** → [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) § \"Recent AWS features (2024-2026)\".\n> Load when: checking 2024-2026 feature availability — Snowflake GA, dynamic partitioning, Firehose-in-VPC, multi-AZ delivery.\n\n## AWS documentation\n\n- **Amazon Kinesis Data Firehose Developer Guide** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fwhat-is-this-service.html\n- **Firehose delivery stream creation** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fbasic-create.html\n- **Firehose data transformation** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fdata-transformation.html\n- **Firehose data format conversion** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fdata-conversion.html\n- **Firehose destinations (OpenSearch \u002F Redshift \u002F Snowflake \u002F Splunk \u002F HTTP)** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fcreate-destination.html\n- **Firehose HTTP endpoint request\u002Fresponse** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fhttpdeliveryrequestresponse.html\n- **Monitoring Firehose with CloudWatch** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fmonitoring-with-cloudwatch-metrics.html\n- **Firehose troubleshooting** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Ftroubleshooting.html\n- **Firehose IAM roles** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fcontrolling-access.html\n- **API Reference** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002FAPIReference\u002F\n- **CLI Reference** - https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Ffirehose\u002F\n\n## References (load on demand)\n\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples: NEED_MORE_INFO (intermittent DeliveryLag) and ESCALATE (OpenSearch cluster red) full DIAGNOSIS blocks\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — pre-flight data requirements (inputs + malformed-input block) and pre-flight safety checks\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 non-obvious Firehose behaviors and recent AWS features 2024-2026\n- [references\u002Ffirehose-delivery-diagnostics.md](references\u002Ffirehose-delivery-diagnostics.md) — diagnostic command quick lookup, per-destination CloudWatch metrics, Step 8 latest-destination cause tables, Appendix A symptom-to-cause map (moved verbatim; existing deep reference)\n","# Kinesis Data Firehose Troubleshooter\n\n## Mindset\n\nA Firehose delivery stream is a four-stage pipeline: **ingest**\n(the PutRecord API or Kinesis Stream source), **transform**\n(optional Lambda processing), **convert** (optional format\nconversion to Parquet\u002FORC via Glue catalog), and **deliver**\n(the destination: S3, OpenSearch, Redshift, Snowflake, HTTP\nendpoint, Splunk). Most \"Firehose failing\" tickets are one stage\nfailing silently while the others report healthy. Diagnose the\nstage first, then the destination-specific config.\n\n- **The 5-layer health check is the upstream gate.** Firehose does not surface all failures as delivery-stream `ACTIVE` status changes; a Lambda transform or destination can fail while the stream stays green. Diagnose by layer: source, transform, convert, deliver, observability.\n- **CloudWatch metrics are per-destination.** `DeliveryToS3.Success`, `DeliveryToOpenSearch.Success`, `DeliveryToRedshift.Success` are separate metrics. Verify the metric matching the configured destination, not just `DeliveryToS3.Success`.\n- **`describe-delivery-stream` is the source of truth.** It returns the full destination config, Lambda ARN, buffering hints, and the S3 backup bucket. The console shows a summary; the API returns the exact JSON the service is using.\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Run the 5-layer health check first (recommended) | Step 1 |\n| Diagnose delivery to S3 fails | Step 2 |\n| Diagnose data transformation Lambda fails | Step 3 |\n| Diagnose delivery lag (high DataFreshness) | Step 4 |\n| Diagnose data format conversion fails (Parquet\u002FORC) | Step 5 |\n| Diagnose delivery to OpenSearch fails | Step 6 |\n| Diagnose delivery to Redshift fails | Step 7 |\n| Diagnose latest destinations (Snowflake \u002F HTTP \u002F Splunk) | Step 8 |\n| Map symptom to root cause quickly | Appendix A |\n| Avoid misdiagnosis pitfalls | Anti-Patterns |\n\n## STRICT output contract\n\nEvery diagnosis MUST emit the exact DIAGNOSIS block with all fields\npopulated (no empty fields, no omitted sections, no reordering).\nAll five LAYER_CHECK lines (Source, Transform, Convert, Deliver,\nObservability) are mandatory - even when the failure is destination-\nspecific.\n\nVerdict-specific rules:\n- `ROOT_CAUSE_FOUND` -> ROOT_CAUSE names a single specific cause; EVIDENCE cites at least one failing API signal or metric; FIX is actionable CLI.\n- `NEED_MORE_INFO` -> ROOT_CAUSE is \"Pending diagnosis - \u003Cwhat is known>\"; NEXT_STEP cites the exact next command.\n- `ESCALATE` -> ESCALATION_PATH names the recipient and the out-of-band action required.\n\n```text\nDIAGNOSIS: \u003Creference>\nDELIVERY_STREAM: \u003Cstream-name>\nDESTINATION: \u003Cs3 | opensearch | redshift | snowflake | http-endpoint | splunk | lambda>\nSYMPTOM: DeliveryToS3Fails | LambdaFails | DeliveryLag | FormatConversionFails | OpenSearchFails | RedshiftFails | LatestDestinationFails\nROOT_CAUSE: \u003Cspecific cause cited>\nEVIDENCE:\n  - \u003Cdiagnostic signal 1>\n  - \u003Cdiagnostic signal 2>\nLAYER_CHECK:\n  - Source: \u003CPASS | FAIL - reason>\n  - Transform: \u003CPASS | FAIL - reason | N\u002FA>\n  - Convert: \u003CPASS | FAIL - reason | N\u002FA>\n  - Deliver: \u003CPASS | FAIL - reason>\n  - Observability: \u003CPASS | FAIL - reason>\nFIX:\n  - \u003Caction 1 with CLI snippet>\n  - \u003Caction 2 ...>\nVERIFICATION:\n  - \u003Ccommand to confirm fix>\nVERDICT: ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE\nNEXT_STEP: \u003Cif NEED_MORE_INFO, the specific next diagnostic>\nESCALATION_PATH: \u003Cif ESCALATE, the recommended path>\n```\n\n## Critical rules at a glance\n\n1. **Run the 5-layer health check FIRST.** Before any destination-specific diagnosis, confirm: (1) source is feeding records, (2) Lambda transform (if any) is not erroring, (3) format conversion (if any) is producing non-zero output, (4) destination is reachable and accepting writes, (5) CloudWatch logging is enabled so you have evidence.\n2. **Verify the per-destination metric.** `DeliveryToS3.Success` is irrelevant when the destination is OpenSearch. Use the metric matching the configured destination.\n3. **`describe-delivery-stream` returns the live config.** The console may lag or show stale state; the API returns the actual JSON Firehose is using.\n4. **Lambda transforms cap output at 6 MB.** A record that grows during transformation (enrichment, JSON expansion) can exceed the cap and be dropped silently to S3 backup.\n5. **DataFreshness is the lag indicator.** A spike in `DeliveryToS3.DataFreshnessSec` means the destination is not keeping up with ingestion. Buffering hints and Lambda duration are the usual culprits.\n\n## NEVER (top 5)\n\n- **NEVER** diagnose a Firehose failure without first running the 5-layer health check. Most \"delivery fails\" tickets are coverage gaps in the transform Lambda, the KMS key policy, or the destination reachability.\n- **NEVER** assume the delivery-stream status `ACTIVE` means records are being delivered. `ACTIVE` only means the stream config is accepted; per-record delivery failures are surfaced via CloudWatch metrics and S3 backup, not status.\n- **NEVER** confuse a Lambda transform timeout with a Firehose bug. Firehose invokes the transform with the configured buffer (1-3 MB or 60-900 sec); a Lambda slower than the buffer cadence produces backpressure, not a Firehose failure.\n- **NEVER** assume Parquet\u002FORC conversion is working because objects land in S3. Conversion can produce 0-byte objects if the input JSON is malformed or the Glue table schema does not match the data. Always verify object size, not just object count.\n- **NEVER** emit `VERDICT: NEED_MORE_INFO` without a `NEXT_STEP` naming a specific diagnostic command. Generic phrases like \"investigate further\" are not acceptable.\n\n## Expert heuristic\n\n- If `DeliveryToS3.Success` drops to 0 instantly after a config change, the failure is **IAM, KMS, or bucket policy** (Step 2). Check CloudTrail for `AccessDenied` on `s3:PutObject` or `kms:GenerateDataKey`.\n- If `DeliveryToS3.DataFreshnessSec` spikes without a drop in `Success`, the failure is **buffering hints or Lambda duration** (Step 4). The destination eventually catches up; data is just delayed.\n- If Parquet objects land but query engines return empty results, the failure is **SerDe \u002F Glue schema mismatch** (Step 5). The bytes are written but unreadable.\n- If only OpenSearch destination fails with `429 Too Many Requests`, the failure is **OpenSearch write throttling** or the Firehose circuit breaker (default: 5 minutes of sustained writes). Scale the OpenSearch cluster or raise the circuit-breaker window.\n- If Redshift COPY fails consistently at the same step, the failure is **column-count mismatch, encoding, or the staging-bucket IAM grant** (Step 7). Look in `STL_LOAD_ERRORS`.\n- If Snowflake \u002F HTTP endpoint \u002F Splunk destinations fail, the failure is usually **credentials, network reachability, or the endpoint's auth model** (Step 8) - these do not exercise S3 KMS or Lambda layers.\n\n## Pre-flight: data requirements\n\n> **Moved verbatim** → [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) § \"Pre-flight: data requirements\".\n> Load when: starting a diagnosis — the required-inputs table and the malformed-input NEED_MORE_INFO block.\n\n## Process - Diagnostic decision tree (apply in order)\n\n### Step 0: Expert knowledge - non-obvious Firehose behaviors\n\n> **Moved verbatim** → [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) § \"Step 0: Expert knowledge - non-obvious Firehose behaviors\".\n> Load when: a behavior seems non-obvious — buffered Lambda invocation, 6 MB response cap, OpenSearch circuit breaker, staging-bucket IAM, update-destination VersionId.\n\n### Step 1: The 5-layer Firehose health check (run FIRST)\n\nBefore any destination-specific diagnosis, confirm all five layers.\nA failing layer invalidates all downstream diagnosis.\n\n**Layer 1 - Source (records are arriving):**\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.[DeliveryStreamStatus,DeliveryStreamType,Source.KinesisStreamSourceConfiguration]' --output table\naws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose \\\n  --metric-name IncomingBytes --dimensions Name=DeliveryStreamName,Value=\u003Cstream-name> \\\n  --start-time $(date -u -v-15M +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Sum --output table\n```\n\nFor Kinesis-stream source, also verify the source stream is alive:\n\n```bash\naws kinesis describe-stream-summary --stream-name \u003Csource-stream-name> \\\n  --query 'StreamDescriptionSummary.[StreamStatus,RetentionPeriodHours,OpenShardCount]' --output table\n```\n\n**Layer 2 - Transform (Lambda is not erroring):**\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].\u003Cdestination-block>.ProcessingConfiguration' --output table\naws cloudwatch get-metric-statistics --namespace AWS\u002FLambda \\\n  --metric-name Errors --dimensions Name=FunctionName,Value=\u003Clambda-function-name> \\\n  --start-time $(date -u -v-15M +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Sum --output table\naws logs filter-log-events --log-group-name \u002Faws\u002Flambda\u002F\u003Clambda-function-name> \\\n  --filter-pattern \"ERROR\" --start-time $(date -u -v-15M +%s)000 --output table\n```\n\n**Layer 3 - Convert (format conversion producing non-zero output):**\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].ExtendedS3DestinationDescription.DataFormatConversionConfiguration' --output table\naws s3api list-objects-v2 --bucket \u003Cbucket> --prefix \u003Cprefix> \\\n  --query 'Contents[*].[Key,Size,LastModified]' --output table | head -20\n```\n\n**Layer 4 - Deliver (destination reachable and accepting writes):**\n\n```bash\naws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose \\\n  --metric-name \u003CDeliveryToS3|DeliveryToOpenSearch|DeliveryToRedshift>.Success \\\n  --dimensions Name=DeliveryStreamName,Value=\u003Cstream-name> \\\n  --start-time $(date -u -v-15M +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Average --output table\n```\n\nFor OpenSearch, also verify domain health:\n\n```bash\naws opensearch describe-domain-health --domain-name \u003Cdomain-name> \\\n  --query 'DomainStatus.[ClusterConfig.DedicatedMasterEnabled,ClusterConfig.InstanceType,ClusterHealth] ' --output table\n```\n\n**Layer 5 - Observability (logging is enabled):**\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].\u003Cdestination-block>.CloudWatchLoggingOptions' --output table\naws logs describe-log-groups --log-group-name-prefix \u002Faws\u002Fkinesisfirehose\u002F\u003Cstream-name> --output table\n```\n\nFlags: `Enabled: false` on CloudWatch logging means you are blind\nto per-record errors. Enable before debugging further.\n\n**If any layer fails, fix the layer FIRST.** Most Firehose failures\nresolve when logging, IAM, or KMS is restored. Specifically:\n- Layer 1 fails -> source stream paused or no PutRecord traffic.\n- Layer 2 fails -> Lambda errors or timeouts; check Lambda logs.\n- Layer 3 fails -> Glue schema mismatch or non-JSON input; check object size.\n- Layer 4 fails -> destination unreachable, IAM gap, or KMS denial.\n- Layer 5 fails -> CloudWatch logging disabled; enable before continuing.\n\n### Step 2: Diagnose delivery to S3 fails\n\n**Symptom:** `DeliveryToS3.Success` drops below 100% or objects\nstop landing in the S3 bucket.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].ExtendedS3DestinationDescription.[BucketARN,RoleARN,BufferingHints,EncryptionConfiguration]' --output table\naws s3api head-bucket --bucket \u003Cbucket-name>\naws s3api get-bucket-location --bucket \u003Cbucket-name>\naws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=PutObject \\\n  --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --query 'Events[*].[EventTime,Username,ResourceName]' --output table | grep -i \u003Cbucket>\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Bucket deleted | `head-bucket` returns `404` \u002F `NoSuchBucket` | Recreate the bucket; or update-destination to a new bucket |\n| Bucket region mismatch | `get-bucket-location` returns a region other than the Firehose region | Move the bucket to the Firehose region; cross-region S3 is not supported |\n| KMS key disabled \u002F rotated | `kms describe-key` shows `KeyState: Disabled` or `PendingDeletion` | Re-enable or recreate the key; update `EncryptionConfiguration.KMSEncryptionConfig` |\n| KMS key policy denies Firehose | `get-key-policy` does not grant `kms:GenerateDataKey` to `delivery.stream.amazonaws.com` | Add a statement allowing `kms:GenerateDataKey`, `kms:Decrypt` for `ServicePrincipal: firehose.amazonaws.com` |\n| Bucket policy denies Firehose role | Bucket policy `Statement` lacks `s3:PutObject` for the Firehose role ARN | Add `s3:PutObject`, `s3:AbortMultipartUpload`, `s3:ListBucketMultipartUploads` to the bucket policy |\n| Firehose role lacks `s3:PutObject` | `simulate-principal-policy` returns `Denied` for `s3:PutObject` on the bucket | Attach \u002F extend the Firehose role policy |\n| Object prefix has invalid characters | Prefix contains `\u002F\u002F`, leading `\u002F`, or forbidden chars | Fix the prefix in `update-destination` |\n| Multipart upload never completed | Object key fragments in `_InProgress\u002F`; `CompleteMultipartUpload` denied | Add `s3:CompleteMultipartUpload`; check S3 lifecycle for `_ABORTED_` |\n\n**VERDICT:** ROOT_CAUSE_FOUND when CloudTrail \u002F IAM check\nidentifies a specific cause; NEED_MORE_INFO when the bucket and\nIAM are correct but writes still fail (capture CloudTrail for the\nexact `errorMessage`).\n\n### Step 3: Diagnose data transformation Lambda fails\n\n**Symptom:** `DeliveryToS3.Success` is healthy but transformed\nrecords are wrong, dropped to S3 backup, or Lambda errors spike.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].\u003Cdestination-block>.ProcessingConfiguration' --output table\naws lambda get-function --function-name \u003Clambda-function-name> \\\n  --query 'Configuration.[Runtime,Timeout,MemorySize,Role]' --output table\naws lambda get-policy --function-name \u003Clambda-function-name> --query 'Policy' --output text\naws logs filter-log-events --log-group-name \u002Faws\u002Flambda\u002F\u003Clambda-function-name> \\\n  --filter-pattern \"ERROR Task timed out\" --start-time $(date -u -v-1H +%s)000 --output table\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Lambda timeout | CloudWatch `Duration` near `Timeout`; log shows \"Task timed out after X seconds\" | Increase Lambda `Timeout` (max 900s); or reduce buffer size |\n| Lambda exception | Log shows stack trace; `Errors` metric > 0 | Fix the handler code; common causes: JSON parse, missing field, ref-data fetch failure |\n| Lambda response > 6 MB | S3 backup receives full batches; log shows \"response payload exceeds 6 MB\" | Reduce buffer size; or compress \u002F trim records in the handler |\n| Lambda resource policy lacks Firehose invoke | `get-policy` lacks `lambda:InvokeFunction` for `firehose.amazonaws.com` | Add `lambda:InvokeFunction` permission with principal `firehose.amazonaws.com`, source-arn = stream ARN |\n| Lambda role lacks downstream access | Logs show `AccessDenied` on DynamoDB \u002F S3 ref-data | Attach the required actions to the Lambda role |\n| Lambda runtime deprecated | `Runtime: nodejs14.x` or `python3.7`; deprecation warning | Upgrade to a supported runtime (nodejs20.x, python3.12) |\n| Lambda concurrency limit hit | CloudWatch `Throttles` > 0 | Raise reserved \u002F account concurrency; or reduce buffer flush rate |\n| Mismatched buffer vs Lambda duration | Buffer flush every 60s but Lambda `Timeout: 30s` for a 50 MB batch | Reduce buffer size or raise Lambda `Timeout` |\n| Lambda returns malformed response | Log shows \"Invalid output format\" | Return `{ records: [{ recordId, result: 'Ok', data: base64 }], ... }` exactly per the Firehose transform protocol |\n\n**VERDICT:** ROOT_CAUSE_FOUND when Lambda log identifies a specific\ncause; NEED_MORE_INFO when Lambda errors are intermittent (sample\nthe handler code or ref-data source).\n\n### Step 4: Diagnose delivery lag (high DataFreshness)\n\n**Symptom:** `DeliveryToS3.DataFreshnessSec` spikes; records land\nin S3 minutes or hours late.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].\u003Cdestination-block>.BufferingHints' --output table\naws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose \\\n  --metric-name DeliveryToS3.DataFreshnessSec \\\n  --dimensions Name=DeliveryStreamName,Value=\u003Cstream-name> \\\n  --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Average,Maximum --output table\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Buffering hints too large | `BufferingHints.SizeInMBs: 128` and `IntervalInSeconds: 900`; low-traffic stream | Reduce `SizeInMBs` to 5-10 or `IntervalInSeconds` to 60-300 |\n| Lambda processing slow | Lambda `Duration` consistently > buffer flush interval | Increase Lambda memory (proportional CPU); parallelize processing; or reduce buffer size |\n| Firehose throttled on `PutRecord` | Source-side `ThrottledRecords` > 0; `WriteThroughputBytes` flat | Request a limit increase; or shard the stream |\n| Destination backpressure (OpenSearch 429) | OpenSearch `429` count > 0 in Firehose logs; circuit breaker engaged | Scale OpenSearch cluster; raise Firehose `IndexRotationPeriod` |\n| KMS throttling | KMS `ThrottledRequests` > 0 | Request KMS RPS limit increase; or use AWS managed key |\n| S3 503 Slow Down | S3 `5xx` rate elevated; `CompleteMultipartUpload` latency up | Use a higher-cardinality prefix; reduce PUT rate per partition |\n| Network path latency | Cross-AZ or cross-region hops (VPN \u002F PrivateLink) | Co-locate Firehose and destination in the same region and AZ group |\n\n**VERDICT:** ROOT_CAUSE_FOUND when metric correlation identifies a\nspecific cause; NEED_MORE_INFO when DataFreshness spikes are\nintermittent and uncorrelated with any single metric (instrument\nper-stage timing in the Lambda transform).\n\n### Step 5: Diagnose data format conversion fails (Parquet\u002FORC)\n\n**Symptom:** objects land in S3 but Athena \u002F engines return empty\nor 0-byte objects; `DeliveryToS3.Success` shows healthy.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].ExtendedS3DestinationDescription.DataFormatConversionConfiguration' --output table\naws glue get-table --database-name \u003Cdb> --name \u003Ctable> \\\n  --query 'Table.[StorageDescriptor.Columns,Parameters]' --output table\naws s3api head-object --bucket \u003Cbucket> --key \u003Cprefix>\u002F\u003Clatest-object> --query 'ContentLength' --output text\naws logs filter-log-events --log-group-name \u002Faws\u002Fkinesisfirehose\u002F\u003Cstream-name> \\\n  --filter-pattern \"FormatConversion\" --output table\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Input not valid JSON | Firehose log: \"Input record is not valid JSON\"; records to S3 error backup | Fix the producer to emit JSON; or change deserializer to OpenXJsonSerDe with tolerance |\n| Glue schema mismatch | `get-table` columns do not match JSON keys; Athena returns nulls | Update the Glue table schema to match the data; or fix the producer |\n| Hive SerDe mismatch (ORC vs Parquet) | OutputFormat set to ORC but writer config is Parquet; or vice versa | Align `OutputFormatConfiguration.Format` with the Glue table `TableType` and SerDe |\n| Timestamp format wrong | Athena returns nulls on `timestamp` columns; Firehose log: \"Invalid timestamp\" | Add `TimestampFormats` to the SerDe (e.g., `yyyy-MM-dd HH:mm:ss.SSSSSS`) |\n| Case sensitivity mismatch | JSON keys `snake_case` but Glue columns `CamelCase` | Set `CaseInsensitive` on the SerDe or rename Glue columns |\n| Nested object not parsed | Glue `struct` type but input is a string-encoded JSON | Add `Mapping` or use a different SerDe; or pre-parse in Lambda transform |\n| 0-byte objects | `head-object ContentLength: 0` | Conversion rejected the whole batch; check the S3 error backup and the Glue schema |\n| Unsupported SerDe (CSV) | `InputFormatConfiguration.Deserializer` is `LazySimpleSerDe` (CSV) but output is Parquet | Use `OpenXJsonSerDe` for JSON-only inputs to Parquet\u002FORC conversion |\n\n**VERDICT:** ROOT_CAUSE_FOUND when Glue schema vs input diff\nidentifies a specific cause; NEED_MORE_INFO when input is valid\nJSON and schema matches but conversion still fails (sample a\nrecord from the source and run it through the Glue crawler).\n\n### Step 6: Diagnose delivery to OpenSearch fails\n\n**Symptom:** `DeliveryToOpenSearch.Success` drops below 100%;\nOpenSearch index missing recent documents.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].AmazonopensearchserviceDestinationDescription.[DomainARN,IndexName,RoleARN,TypeName,S3BackupMode]' --output table\naws opensearch describe-domain --domain-name \u003Cdomain-name> \\\n  --query 'DomainStatus.[Endpoints,ClusterConfig.InstanceType,ClusterConfig.InstanceCount,EncryptionAtRestOptions.Enabled]' --output table\naws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose \\\n  --metric-name DeliveryToOpenSearch.Success \\\n  --dimensions Name=DeliveryStreamName,Value=\u003Cstream-name> \\\n  --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \\\n  --period 60 --statistics Average --output table\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Cluster unreachable | `describe-domain` shows `Endpoints: null` or processing; Firehose log: `Connection refused` | Wait for domain to finish processing; or check VPC endpoint reachability |\n| Auth failure - IAM | OpenSearch access policy does not allow the Firehose role | Add the Firehose role to the domain access policy with `es:ESHttpPost` |\n| Auth failure - basic | Domain uses master-user auth; Firehose not configured with correct credentials | Configure `ClusterEndpoint` + `Username`\u002F`Password` (Secrets Manager) |\n| Fine-grained access control (FGAC) | Firehose role lacks the backend role mapping | Map the Firehose role to the appropriate OpenSearch role via the security plugin |\n| OpenSearch 429 (Too Many Requests) | `429` count in Firehose logs; circuit breaker engaged | Scale the cluster (more \u002F larger instances); or shard the Firehose destination |\n| Circuit breaker tripped | Delivery resumes after sustained success; `Success: 0` for the breaker window | Same as 429; raise the breaker window via AWS Support if needed |\n| Index name invalid | Index name has uppercase or invalid char; `400 Bad Request` | Use lowercase, no special chars; use `IndexRotationPeriod` for time-based indices |\n| Document mapping conflict | Field type changes between records; OpenSearch rejects | Map fields explicitly in the index template; or use dynamic templates |\n| VPC OpenSearch without Firehose VPC config | Firehose in a different VPC; private network unreachable | Put Firehose in the same VPC as OpenSearch; or use a transit gateway |\n| KMS key policy (encryption-at-rest) | Key policy does not grant the Firehose role | Add `kms:GenerateDataKey`, `kms:Decrypt` for the Firehose role |\n| OpenSearch health yellow\u002Fred | `describe-domain-health` shows `Yellow`\u002F`Red` | Resolve shard allocation; free disk space; or restart unhealthy nodes |\n\n**VERDICT:** ROOT_CAUSE_FOUND when access policy \u002F OpenSearch\nhealth identifies a specific cause; NEED_MORE_INFO when auth is\ncorrect and the cluster is green but deliveries still fail\n(capture the exact HTTP response code from Firehose logs).\n\n### Step 7: Diagnose delivery to Redshift fails\n\n**Symptom:** `DeliveryToRedshift.Success` drops; Redshift tables\nmissing recent data.\n\n```bash\naws firehose describe-delivery-stream --delivery-stream-name \u003Cstream-name> \\\n  --query 'DeliveryStreamDescription.Destinations[0].RedshiftDestinationDescription.[ClusterJDBCURL,CopyCommand,RoleARN,Username,S3Configuration]' --output table\naws redshift describe-clusters --cluster-identifier \u003Ccluster-id> \\\n  --query 'Clusters[0].[ClusterStatus,ClusterAvailabilityStatus,NodeType,NumberOfNodes]' --output table\naws logs filter-log-events --log-group-name \u002Faws\u002Fkinesisfirehose\u002F\u003Cstream-name> \\\n  --filter-pattern \"COPY\" --output table\n```\n\nConnect to Redshift and check the load errors:\n\n```sql\nSELECT query, filename, line_number, colname, type, err_reason\nFROM stl_load_errors\nWHERE start_time > dateadd(hour, -1, getdate())\nORDER BY start_time DESC LIMIT 20;\n```\n\n| Cause | Diagnostic signal | Fix |\n|---|---|---|\n| Redshift cluster paused \u002F unavailable | `describe-clusters` shows `paused`, `available` with no active connections, or `resizing` | Resume the cluster; wait for resize; or use a Multi-AZ cluster |\n| JDBC URL unreachable | Firehose log: `Connection refused` | Verify the security group allows the Firehose subnet to TCP\u002F5439; or use Firehose-in-VPC |\n| Credentials invalid | Firehose log: `Authentication failed` | Update `Username` + `Password` (Secrets Manager); rotate |\n| COPY column mismatch | `stl_load_errors` shows `Extra column(s)` \u002F `Missing column(s)` | Align the `CopyCommand.DataTableColumns` with the table schema |\n| Encoding \u002F format invalid | `stl_load_errors` shows `Invalid digit, Value '.', ... ` | Fix the producer format; or set `COPY ... ACCEPTANYDATE` \u002F `TRIMBLANKS` \u002F `NULL AS` |\n| Staging bucket IAM gap | Firehose delivers to staging; COPY fails with `S3ServiceException: Access Denied` | Grant the **Redshift cluster role** (not Firehose role) `s3:GetObject` on the staging bucket |\n| Staging bucket deleted | `head-bucket` on staging bucket returns 404 | Recreate staging bucket; or `update-destination` to a new staging bucket |\n| Staging bucket region mismatch | Staging bucket in a different region than Redshift | Move staging bucket to the Redshift region |\n| COPY timeout | `stl_load_errors` shows large file; COPY duration > Firehose retry window | Split files (smaller Firehose buffer); or use `COPY ... MAXERROR 100` with monitoring |\n| Date \u002F timestamp format | `stl_load_errors` shows `Invalid timestamp format` | Set `COPY ... FORMAT AS CSV` and `timeformat AS 'YYYY-MM-DD HH:MI:SS'` |\n| KMS key for staging bucket | Redshift cluster role lacks `kms:Decrypt` on the staging bucket key | Add the Redshift cluster role to the staging bucket KMS key policy |\n\n**VERDICT:** ROOT_CAUSE_FOUND when `stl_load_errors` identifies a\nspecific cause; NEED_MORE_INFO when the COPY appears to succeed\nbut rows are missing (check the Redshift workload manager and\ntransaction commits).\n\n### Step 8: Diagnose latest destinations (Snowflake \u002F HTTP \u002F Splunk)\n\n> **Moved verbatim** → [references\u002Ffirehose-delivery-diagnostics.md](references\u002Ffirehose-delivery-diagnostics.md) § \"Step 8: Diagnose latest destinations (Snowflake \u002F HTTP \u002F Splunk)\".\n> Load when: diagnosing Snowflake, HTTP endpoint, or Splunk destinations — per-destination cause\u002Fsignal\u002Ffix tables.\n\n## Output format\n\nThe output block template above is the authoritative structure.\nViolating any rule is a misdiagnosis. Three worked examples follow.\n\n### Worked example - ROOT_CAUSE_FOUND, DeliveryToS3Fails (KMS gap)\n\n```text\nDIAGNOSIS: prod-firehose-s3\nDELIVERY_STREAM: prod-events-delivery\nDESTINATION: s3 (extended)\nSYMPTOM: DeliveryToS3Fails\nROOT_CAUSE: KMS key policy on arn:aws:kms:us-east-1:111111111111:key\u002Fabc123\n            does not grant the Firehose service principal\n            kms:GenerateDataKey. The key policy allows only the\n            customer account root.\nEVIDENCE:\n  - CloudTrail PutObject events for the Firehose role show errorMessage: \"AccessDenied: kms:GenerateDataKey on arn:aws:kms:us-east-1:111111111111:key\u002Fabc123\"\n  - aws kms get-key-policy: Statement Principal = {\"AWS\": \"arn:aws:iam::111111111111:root\"} only\nLAYER_CHECK:\n  - Source: PASS - IncomingBytes > 0; stream type DirectPut\n  - Transform: N\u002FA - no Lambda processing configured\n  - Convert: N\u002FA - no format conversion\n  - Deliver: FAIL - KMS key policy denies Firehose service principal\n  - Observability: PASS - CloudWatch logging enabled\nFIX:\n  - Add the Firehose service principal to the KMS key policy:\n    aws kms put-key-policy --key-id arn:aws:kms:us-east-1:111111111111:key\u002Fabc123 --policy-name default --policy '{\"Id\":\"firehose-key-policy\",\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Enable IAM permissions\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::111111111111:root\"},\"Action\":\"kms:*\",\"Resource\":\"*\"},{\"Sid\":\"Allow Firehose\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"firehose.amazonaws.com\"},\"Action\":[\"kms:GenerateDataKey\",\"kms:Decrypt\"],\"Resource\":\"*\"}]}'\n  - No Firehose-side change; the key policy is the only gap.\nVERIFICATION:\n  - aws cloudwatch get-metric-statistics --namespace AWS\u002FFirehose --metric-name DeliveryToS3.Success --dimensions Name=DeliveryStreamName,Value=prod-events-delivery --start-time $(date -u -v-15M +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S) --period 60 --statistics Average --output table\n  - Expect: Average >= 1.0 within 5-10 minutes of the key policy update.\nVERDICT: ROOT_CAUSE_FOUND\nNEXT_STEP: None\nESCALATION_PATH: None\n```\n\n### Worked example - NEED_MORE_INFO, DeliveryLag (intermittent)\n\n> **Moved verbatim** → [references\u002Fworked-examples.md](references\u002Fworked-examples.md) § \"Worked example - NEED_MORE_INFO, DeliveryLag (intermittent)\".\n> Load when: emitting a NEED_MORE_INFO verdict — intermittent DeliveryLag example with per-stage timing next steps.\n\n### Worked example - ESCALATE, OpenSearchFails (cluster red)\n\n> **Moved verbatim** → [references\u002Fworked-examples.md](references\u002Fworked-examples.md) § \"Worked example - ESCALATE, OpenSearchFails (cluster red)\".\n> Load when: emitting an ESCALATE verdict — OpenSearch cluster-red example with out-of-band remediation.\n\n## Anti-Patterns - NEVER do these things\n\n- NEVER diagnose a Firehose failure without first running the 5-layer health check. Most \"delivery fails\" tickets are coverage gaps in the transform Lambda, KMS key policy, or destination reachability.\n- NEVER assume the delivery-stream status `ACTIVE` means records are being delivered. `ACTIVE` only means the stream config is accepted; per-record delivery failures are surfaced via CloudWatch metrics and S3 backup, not status.\n- NEVER confuse a Lambda transform timeout with a Firehose bug. Firehose invokes the transform with the configured buffer; a Lambda slower than the buffer cadence produces backpressure, not a Firehose failure.\n- NEVER assume Parquet\u002FORC conversion is working because objects land in S3. Conversion can produce 0-byte objects if the input JSON is malformed or the Glue table schema does not match the data. Always verify object size, not just object count.\n- NEVER emit `VERDICT: NEED_MORE_INFO` without a `NEXT_STEP` naming a specific diagnostic command. Generic phrases like \"investigate further\" are not acceptable.\n\n## Pre-flight safety checks\n\n> **Moved verbatim** → [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) § \"Pre-flight safety checks\".\n> Load when: before any state-changing operation — confirmation gate, update-destination blast radius, KMS policy backup.\n\n## Appendix A - Symptom-to-cause map (quick reference)\n\n> **Moved verbatim** → [references\u002Ffirehose-delivery-diagnostics.md](references\u002Ffirehose-delivery-diagnostics.md) § \"Appendix A - Symptom-to-cause map (quick reference)\".\n> Load when: mapping a symptom to its most common root cause and the command that verifies it.\n\n## Recent AWS features (2024-2026)\n\n> **Moved verbatim** → [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) § \"Recent AWS features (2024-2026)\".\n> Load when: checking 2024-2026 feature availability — Snowflake GA, dynamic partitioning, Firehose-in-VPC, multi-AZ delivery.\n\n## AWS documentation\n\n- **Amazon Kinesis Data Firehose Developer Guide** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fwhat-is-this-service.html\n- **Firehose delivery stream creation** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fbasic-create.html\n- **Firehose data transformation** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fdata-transformation.html\n- **Firehose data format conversion** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fdata-conversion.html\n- **Firehose destinations (OpenSearch \u002F Redshift \u002F Snowflake \u002F Splunk \u002F HTTP)** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fcreate-destination.html\n- **Firehose HTTP endpoint request\u002Fresponse** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fhttpdeliveryrequestresponse.html\n- **Monitoring Firehose with CloudWatch** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fmonitoring-with-cloudwatch-metrics.html\n- **Firehose troubleshooting** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Ftroubleshooting.html\n- **Firehose IAM roles** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002Fdev\u002Fcontrolling-access.html\n- **API Reference** - https:\u002F\u002Fdocs.aws.amazon.com\u002Ffirehose\u002Flatest\u002FAPIReference\u002F\n- **CLI Reference** - https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Ffirehose\u002F\n\n## References (load on demand)\n\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples: NEED_MORE_INFO (intermittent DeliveryLag) and ESCALATE (OpenSearch cluster red) full DIAGNOSIS blocks\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — pre-flight data requirements (inputs + malformed-input block) and pre-flight safety checks\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 non-obvious Firehose behaviors and recent AWS features 2024-2026\n- [references\u002Ffirehose-delivery-diagnostics.md](references\u002Ffirehose-delivery-diagnostics.md) — diagnostic command quick lookup, per-destination CloudWatch metrics, Step 8 latest-destination cause tables, Appendix A symptom-to-cause map (moved verbatim; existing deep reference)\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":42},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"lifecycle_status":39,"invocation_schema":40,"supports_pipeline":37,"activation_triggers":41},"kinesis, firehose, analytics, troubleshoot, delivery-stream, lambda, opensearch, redshift, diagnostic","2","Jacky Chan — AWS Community Builder","aws-cloudops","Analytics","0.1.0","Kinesis, Kinesis Data Firehose, delivery stream, delivery to S3 fails, delivery lag, data transformation Lambda, Lambda processing, data format conversion, Parquet, ORC, Hive SerDe, OpenSearch delivery, Redshift COPY, Snowflake delivery, HTTP endpoint delivery, Splunk HEC, circuit breaker, buffering hints, KMS key policy, staging bucket","troubleshoot","high","false","capability","Diagnosing a Kinesis Data Firehose delivery stream that is failing to deliver, lagging, transforming incorrectly, or one of the downstream destinations returns errors. Covers the eight primary symptom categories: delivery to S3 fails, data transformation Lambda fails, delivery lag, data format conversion fails (Parquet\u002FORC), delivery to OpenSearch fails, delivery to Redshift fails, and latest destinations (Firehose to Snowflake, HTTP endpoint, Splunk). Use when CloudWatch shows DeliveryToS3.Success dropping, Firehose logs show Lambda transformation errors, ORC\u002FParquet conversion produces 0-byte objects, the OpenSearch destination returns 429s, or the Redshift COPY command fails.","true","ROOT_CAUSE_FOUND | NEED_MORE_INFO | ESCALATE","active","Input: either (a) a delivery-stream-name with observed symptom (delivery-to-s3-fails \u002F lambda-fails \u002F delivery-lag \u002F format-conversion-fails \u002F opensearch-fails \u002F redshift-fails \u002F latest-destination-fails), optionally with a destination type (s3 \u002F opensearch \u002F redshift \u002F snowflake \u002F http-endpoint \u002F splunk), OR (b) live-account diagnostic output from describe-delivery-stream, get-metric-statistics, filter-log- events, etc. Output: deterministic DIAGNOSIS block per stream - SYMPTOM\u002FROOT_CAUSE\u002FEVIDENCE\u002FLAYER_CHECK\u002FFIX\u002F VERDICT - where VERDICT is ROOT_CAUSE_FOUND (cause identified + fix actionable), NEED_MORE_INFO (specific next diagnostic cited), or ESCALATE (requires AWS Support or out-of-band action).","Firehose delivery fails, Firehose delivery lag, Firehose to S3 fails, Firehose to OpenSearch fails, Firehose to Redshift fails, Firehose to Snowflake fails, Firehose HTTP endpoint fails, Firehose Splunk delivery fails, Firehose Lambda transformation fails, DeliveryToS3.Success drops, DeliveryToS3.DataFreshnessSec high, data format conversion fails, Parquet conversion 0 bytes, ORC SerDe mismatch, Firehose circuit breaker, OpenSearch 429, Redshift COPY fails, Splunk HEC token invalid, Firehose KMS denied, bucket region mismatch","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline diagnosis. Live- account troubleshooting uses aws firehose describe-delivery- stream, list-tags-for-stream, list-delivery-streams, start- delivery-stream-encryption, stop-delivery-stream-encryption, aws logs filter-log-events, aws lambda get-function, get-policy, invoke, aws s3api head-bucket, get-bucket-location, aws opensearch describe-domain, describe-domain-health, aws...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fkinesis-firehose-troubleshooter",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill kinesis-firehose-troubleshooter",{"tool":57,"command":58},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill kinesis-firehose-troubleshooter",{"tool":60,"command":61},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill kinesis-firehose-troubleshooter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002FSKILL.md",true,[65,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",8751,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Feval\u002Ftest-cases.yaml",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"evals\u002Fbaselines\u002Fdelivery-to-s3-kms-gap.md",654,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fbaselines\u002Fdelivery-to-s3-kms-gap.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"evals\u002Fbaselines\u002Fformat-conversion-0-byte.md",617,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fbaselines\u002Fformat-conversion-0-byte.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"evals\u002Fbaselines\u002Flambda-transform-6mb-cap.md",693,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fbaselines\u002Flambda-transform-6mb-cap.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"evals\u002Fbaselines\u002Fopensearch-circuit-breaker.md",659,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fbaselines\u002Fopensearch-circuit-breaker.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fbaselines\u002Fredshift-copy-column-mismatch.md",663,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fbaselines\u002Fredshift-copy-column-mismatch.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"evals\u002Feval_config.yaml",1757,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Feval_config.yaml",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"evals\u002Fevals.json",4382,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fevals.json",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"evals\u002Fprompts\u002Fdelivery-to-s3-kms-gap.md",1017,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fprompts\u002Fdelivery-to-s3-kms-gap.md",{"path":104,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":105,"sourceHtmlUrl":106},"evals\u002Fprompts\u002Fformat-conversion-0-byte.md",1055,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fprompts\u002Fformat-conversion-0-byte.md",{"path":108,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":109,"sourceHtmlUrl":110},"evals\u002Fprompts\u002Flambda-transform-6mb-cap.md",1012,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fprompts\u002Flambda-transform-6mb-cap.md",{"path":112,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":113,"sourceHtmlUrl":114},"evals\u002Fprompts\u002Fopensearch-circuit-breaker.md",781,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fprompts\u002Fopensearch-circuit-breaker.md",{"path":116,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":117,"sourceHtmlUrl":118},"evals\u002Fprompts\u002Fredshift-copy-column-mismatch.md",1136,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fevals\u002Fprompts\u002Fredshift-copy-column-mismatch.md",{"path":120,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":121,"sourceHtmlUrl":122},"examples\u002FREADME.md",9270,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fexamples\u002FREADME.md",{"path":124,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fadvanced-patterns.md",6469,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Freferences\u002Fadvanced-patterns.md",{"path":128,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fdiagnostic-commands.md",2910,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Freferences\u002Fdiagnostic-commands.md",{"path":132,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Ffirehose-delivery-diagnostics.md",19487,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Freferences\u002Ffirehose-delivery-diagnostics.md",{"path":136,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":137,"sourceHtmlUrl":138},"references\u002Fworked-examples.md",4076,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Freferences\u002Fworked-examples.md",{"path":140,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":141,"sourceHtmlUrl":142},"skill.usf.yaml",4588,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkinesis-firehose-troubleshooter\u002Fskill.usf.yaml",[144,151,158,165,172,179],{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","xray-tracing-deployer","Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL \u002F method \u002F service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry \u002F ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS \u002F EKS \u002F Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","wellarchitected-workload-auditor","Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","wellarchitected-review-operator","Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer \u002F get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","wafv2-web-acl-deployer","Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","wafv2-web-acl-auditor","Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow\u002Fbypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","waf-rule-deployer","Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]