{
    "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation",
    "locale": "nl",
    "title": "AWS CloudWatch Investigation Skill | DeLaParra Services",
    "description": ">",
    "alternates": {
        "en": "https://delaparra-services.nl/skills/aws-cloudwatch-investigation",
        "nl": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.csv",
        "md": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.md",
        "json": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.json",
        "zip": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.zip",
        "pdf": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.csv",
            "encodingFormat": "text/csv",
            "name": "aws-cloudwatch-investigation.csv"
        },
        {
            "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.json",
            "encodingFormat": "application/json",
            "name": "aws-cloudwatch-investigation.json"
        },
        {
            "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.md",
            "encodingFormat": "text/markdown",
            "name": "aws-cloudwatch-investigation.md"
        },
        {
            "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.pdf",
            "encodingFormat": "application/pdf",
            "name": "aws-cloudwatch-investigation.pdf"
        },
        {
            "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.zip",
            "encodingFormat": "application/zip",
            "name": "aws-cloudwatch-investigation.zip"
        },
        {
            "url": "https://delaparra-services.nl/skills/aws-cloudwatch-investigation/download",
            "encodingFormat": "application/zip",
            "name": "aws-cloudwatch-investigation-files.zip"
        }
    ],
    "markdown": "# AWS CloudWatch Investigation Skill\n\n \n\n\\>\n\n \n\n**Licentie** MIT\n\n \n\n**Bron** github/awesome-copilot\n\n [Download zip](<https://delaparra-services.nl/skills/aws-cloudwatch-investigation/download>)   \n\n# AWS CloudWatch Investigation Skill\n\n \n\nHerbruikbare patronen voor het onderzoeken van productie-incidenten met behulp van CloudWatch Logs, Metrics en Alarms. Deze patronen zijn bedoeld om tijdens de triage van incidenten met elkaar te worden gecombineerd.\n\n  \n\n## Patroon 1: Query-sjablonen voor Logs Insights\n\n \n\n### Detectie van pieken in fouten\n\n \n\nZoek de meest voorkomende fouten binnen een bepaald tijdsbestek, gegroepeerd per fouttype:\n\n \n\n```\nfields @timestamp, @message, @logStream\n| filter @message like /(?i)(error|exception|fatal|critical)/\n| stats count(*) as errorCount by bin(5m), @logStream\n| sort errorCount desc\n| limit 20\n```\n\n \n\n### P99-latentie per bewerking\n\n \n\nZoek uit welke bewerkingen de pieken in de latentie veroorzaken:\n\n \n\n```\nfields @timestamp, @duration, operation\n| filter ispresent(@duration)\n| stats avg(@duration) as avgMs,\n        pct(@duration, 50) as p50Ms,\n        pct(@duration, 95) as p95Ms,\n        pct(@duration, 99) as p99Ms,\n        count(*) as invocations\n  by operation\n| sort p99Ms desc\n| limit 15\n```\n\n \n\n### Lambda-koudstartdetectie\n\n \n\nDe impact van een koude start tijdens een incident in kaart brengen:\n\n \n\n```\nfields @timestamp, @duration, @initDuration, @memorySize, @maxMemoryUsed\n| filter ispresent(@initDuration)\n| stats count(*) as coldStarts,\n        avg(@initDuration) as avgInitMs,\n        max(@initDuration) as maxInitMs,\n        avg(@duration) as avgDurationMs\n  by bin(5m)\n| sort @timestamp desc\n```\n\n \n\n### Detectie van geheugentekort (OOM)\n\n \n\nZoek Lambda-functies of containers die door geheugendruk zijn afgesloten:\n\n \n\n```\nfields @timestamp, @message, @logStream, @memorySize, @maxMemoryUsed\n| filter @message like /Runtime exited|out of memory|OOMKilled|Cannot allocate memory|MemoryError/\n| stats count(*) as oomEvents by @logStream, bin(10m)\n| sort oomEvents desc\n| limit 10\n```\n\n \n\nVoor de ontwikkeling van het geheugengebruik vóór een OOM:\n\n \n\n```\nfields @timestamp, @maxMemoryUsed, @memorySize\n| filter ispresent(@maxMemoryUsed)\n| stats max(@maxMemoryUsed / @memorySize * 100) as peakMemPct,\n        avg(@maxMemoryUsed / @memorySize * 100) as avgMemPct\n  by bin(5m)\n| sort @timestamp desc\n```\n\n \n\n### Time-outdetectie\n\n \n\nZoek aanroepen die de ingestelde time-out bereiken:\n\n \n\n```\nfields @timestamp, @duration, @logStream, @requestId\n| filter @message like /Task timed out/ or @duration > 28000\n| stats count(*) as timeouts by @logStream, bin(5m)\n| sort timeouts desc\n```\n\n  \n\n## Patroon 2: Correlatie tussen alarmgeschiedenis en implementatiegebeurtenissen\n\n \n\n### Proces\n\n \n\n1. **De overgangstijd van het alarm ophalen** — noteer het exacte tijdstip waarop het alarm in de ALARM-status kwam. \n1. **Zoek in CloudTrail** naar gebeurtenissen die te maken hebben met de implementatie binnen een tijdsvenster van \\[alarm\\_time - 30min, alarm\\_time\\]:\n\n \n\n```\n# CloudTrail Lake query for deployment events\nSELECT eventTime, eventName, userIdentity.arn, requestParameters\nFROM <event-data-store-id>\nWHERE eventTime > '<alarm_time_minus_30m>'\n  AND eventTime < '<alarm_time>'\n  AND eventName IN (\n    'UpdateFunctionCode', 'UpdateFunctionConfiguration',\n    'UpdateService', 'CreateDeployment', 'RegisterTaskDefinition',\n    'CreateChangeSet', 'ExecuteChangeSet',\n    'StartPipelineExecution', 'PutImage'\n  )\nORDER BY eventTime DESC\n```\n\n \n\n1. **Correlatiecriteria** — een implementatie wordt als \"gecorreleerd\" beschouwd als:\n\n \n\n- Het richt zich op dezelfde dienst/bron als het alarm \n- Het was binnen 15 minuten voor de alarmwisseling klaar \n- De identiteit van de implementator komt overeen met een CI/CD-rol (niet met iemand die een hotfix toepast) \n1. **De correlatie versterken:**\n\n \n\n- Kijk eens of hetzelfde alarm in de vorige implementatiecyclus in orde was \n- Controleer of er geen andere veranderingen in de omgeving (schaalbewerkingen, configuratiewijzigingen) in hetzelfde venster hebben plaatsgevonden \n- Let op storingen in de canary- of synthetische monitors die tegelijkertijd zijn begonnen\n\n \n\n### Uitvoerformaat\n\n \n\n```\nDeploy Correlation:\n  Event: UpdateFunctionCode\n  Time: 2024-03-15T14:23:07Z (12 min before alarm)\n  Actor: arn:aws:sts::123456789012:assumed-role/github-actions-deploy/session\n  Resource: arn:aws:lambda:us-east-1:123456789012:function:payment-processor\n  Correlation: STRONG — same resource, CI/CD actor, alarm was OK prior cycle\n```\n\n  \n\n## Patroon 3: Beslissingsboom voor het beperken van de explosieradius\n\n \n\nGebruik deze structuur om een incident systematisch in kaart te brengen, van het meest algemene naar het meest specifieke:\n\n \n\n```\nSTART\n  |\n  v\n[1] ACCOUNT — Which account(s) show the alarm?\n  |  - Check: Are alarms firing in multiple accounts?\n  |  - If yes → suspect shared service (SSO, networking, shared deployment pipeline)\n  |  - If no → proceed to Region\n  v\n[2] REGION — Which region(s) are affected?\n  |  - Check: Same alarm in other regions?\n  |  - If multi-region → suspect global service (IAM, Route53, S3 global)\n  |  - If single-region → proceed to Service\n  v\n[3] SERVICE — Which service namespace shows degradation?\n  |  - Check CloudWatch namespace: AWS/Lambda, AWS/ECS, AWS/ApiGateway, etc.\n  |  - If multiple services → suspect shared dependency (VPC, NAT, DNS, IAM)\n  |  - If single service → proceed to Operation\n  v\n[4] OPERATION — Which API action or function is failing?\n  |  - For Lambda: which function name?\n  |  - For ECS: which service/task definition?\n  |  - For API GW: which stage/resource/method?\n  |  - If all operations → suspect service-level issue (throttling, quota)\n  |  - If specific operation → proceed to Resource\n  v\n[5] RESOURCE — Which specific resource instance?\n     - Function ARN, Task ID, DB instance identifier\n     - This is your investigation target\n     - Proceed to log and trace analysis scoped to this resource\n```\n\n \n\n### Onderzoek naar gedeelde afhankelijkheden\n\n \n\nAls de impact meerdere diensten betreft, ga dan in deze volgorde te werk:\n\n \n\n1. **VPC/Netwerken** — NAT-gatewayfout bij poorttoewijzing, pakketten die verloren gaan, fouten bij DNS-resolutie \n1. **IAM/STS** — ThrottlingException bij AssumeRole, vertraging bij het genereren van tokens \n1. **Afhankelijkheid stroomafwaarts** — gedeelde database, cache of externe API \n1. **Implementatiepijplijn** — gelijktijdige implementaties in verschillende services vanuit één pijplijnrun \n1. **AWS-servicegebeurtenis** — kijk op het AWS Health Dashboard en bij Service Health voor de regio\n\n  \n\n## Patroon 4: Metric-querypatronen in PromQL-stijl\n\n \n\nDeze patronen maken gebruik van CloudWatch-metriekberekeningen en GetMetricData om samengestelde signalen te genereren. Je kunt ze weergeven als metriekquery’s voor dashboards of om ze programmatisch op te halen.\n\n \n\n### Foutpercentage\n\n \n\n```\nMetricDataQueries:\n  - Id: errors\n    MetricStat:\n      Metric:\n        Namespace: AWS/Lambda\n        MetricName: Errors\n        Dimensions: [{Name: FunctionName, Value: TARGET}]\n      Period: 60\n      Stat: Sum\n  - Id: invocations\n    MetricStat:\n      Metric:\n        Namespace: AWS/Lambda\n        MetricName: Invocations\n        Dimensions: [{Name: FunctionName, Value: TARGET}]\n      Period: 60\n      Stat: Sum\n  - Id: error_rate\n    Expression: \"errors / invocations * 100\"\n    Label: \"Error Rate %\"\n```\n\n \n\n### Detectie van afwijkingen in de latentie (vergeleken met de basislijn)\n\n \n\n```\nMetricDataQueries:\n  - Id: current_p99\n    MetricStat:\n      Metric:\n        Namespace: AWS/Lambda\n        MetricName: Duration\n        Dimensions: [{Name: FunctionName, Value: TARGET}]\n      Period: 300\n      Stat: p99\n  - Id: baseline_p99\n    MetricStat:\n      Metric:\n        Namespace: AWS/Lambda\n        MetricName: Duration\n        Dimensions: [{Name: FunctionName, Value: TARGET}]\n      Period: 300\n      Stat: p99\n    # Use StartTime/EndTime set to same window last week\n  - Id: anomaly_ratio\n    Expression: \"current_p99 / baseline_p99\"\n    Label: \"Latency vs Baseline (ratio > 2 = anomaly)\"\n```\n\n \n\n### Drosseldrukscore\n\n \n\nCombineer meerdere regelingssignalen tot één drukwaarde:\n\n \n\n```\nMetricDataQueries:\n  - Id: lambda_throttles\n    MetricStat:\n      Metric: {Namespace: AWS/Lambda, MetricName: Throttles}\n      Period: 60\n      Stat: Sum\n  - Id: api_gw_429s\n    MetricStat:\n      Metric: {Namespace: AWS/ApiGateway, MetricName: 4XXError, Dimensions: [{Name: ApiName, Value: TARGET}]}\n      Period: 60\n      Stat: Sum\n  - Id: dynamo_throttles\n    MetricStat:\n      Metric: {Namespace: AWS/DynamoDB, MetricName: ThrottledRequests, Dimensions: [{Name: TableName, Value: TARGET}]}\n      Period: 60\n      Stat: Sum\n  - Id: throttle_pressure\n    Expression: \"lambda_throttles + api_gw_429s + dynamo_throttles\"\n    Label: \"Combined Throttle Pressure\"\n```\n\n \n\n### Ruimte voor gelijktijdige uitvoering\n\n \n\n```\nMetricDataQueries:\n  - Id: concurrent\n    MetricStat:\n      Metric: {Namespace: AWS/Lambda, MetricName: ConcurrentExecutions}\n      Period: 60\n      Stat: Maximum\n  - Id: headroom\n    Expression: \"1000 - concurrent\"\n    Label: \"Remaining Concurrency (account limit 1000)\"\n```\n\n  \n\n## Patroon 5: Reconstructie van de tijdlijn van het incident\n\n \n\n### Proces\n\n \n\nStel een nauwkeurige tijdlijn samen door gegevens uit verschillende bronnen te combineren:\n\n \n\n1. **Tijdstempels verzamelen:**\n\n    Bron Zoekopdracht Resultaten     CloudWatch-alarmen API voor alarmgeschiedenis Tijden van statusovergangen   CloudWatch-statistieken GetMetricData met een periode van 1 minuut Eerste afwijkingspunt   CloudWatch Logs Logs Insights met ` earliest(@timestamp) ` Eerste keer dat de fout optrad   CloudTrail Gebeurtenissen opzoeken, gefilterd op tijd Implementatie-/wijzigingsgebeurtenissen   AWS Health DescribeEvents Incidenten aan de AWS-kant    \n\n1. **Maak de tijdlijn:**\n\n \n\n```\nfields @timestamp, @message\n| filter @message like /ERROR|WARN|timeout|refused|denied/\n| stats earliest(@timestamp) as firstSeen, latest(@timestamp) as lastSeen, count(*) as occurrences\n  by @message\n| sort firstSeen asc\n| limit 20\n```\n\n \n\n1. **Bepaal de volgorde:**\n\n \n\n```\nTimeline:\n  T-15m: CloudTrail — UpdateFunctionCode by CI/CD role\n  T-12m: Logs — first error \"Connection refused to payments-api.internal\"\n  T-10m: Metrics — Error count crosses 5/min threshold\n  T-8m:  Alarm — PaymentProcessorErrors enters ALARM\n  T-5m:  Metrics — p99 latency spikes to 28s (timeout)\n  T-0:   Current — error rate at 45%, alarm still firing\n```\n\n \n\n1. **Bepaal de oorzaak** — de allereerste verandering die aan alle symptomen voorafging. Ga terug in de tijd vanaf het eerste symptoom naar de meest recente wijziging (implementatie, configuratiewijziging, schaalbewerking of verandering in externe afhankelijkheden).\n\n \n\n### Valkuilen\n\n \n\n- De tijdstempels van CloudWatch-metrics zijn op het einde van de periode. Een gegevenspunt van 1 minuut om 14:05 geldt voor de periode 14:04-14:05. \n- Bij CloudTrail-gebeurtenissen kan er een vertraging van maximaal 15 minuten optreden. Gebruik ` eventTime ` en niet de tijd van opname. \n- De tijdstempels van loggroepen zijn afhankelijk van de verversingsinterval van de agent/SDK. Houd rekening met een klokafwijking van 30-60 seconden. \n- Veranderingen in de alarmstatus hebben een ingebouwde evaluatievertraging (periodes x evaluatieperiodes). De daadwerkelijke afwijking begon al eerder.\n\n \n\n## Bestanden\n\n \n\n- ` LICENSE ` \n- ` SKILL.md ` \n- ` SOURCE.md `\n\n \n\n## Gerelateerde termen\n\n \n\n- [log](<https://delaparra-services.nl/nl/kennisbank/log>) \n- [Monitoring & Observability](<https://delaparra-services.nl/nl/kennisbank/monitoring-observability>) \n- [structured logging](<https://delaparra-services.nl/nl/kennisbank/structured-logging>)\n\n \n\n[Een skill installeren in je AI-assistent](<https://delaparra-services.nl/nl/handleidingen/een-skill-installeren-in-je-ai-assistent>)\n\n[HTML version](https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Maatwerk software, webapplicaties en mobiele apps, ontwikkeld in Laravel door één ontwikkelaar in Groningen. Vaste prijs vooraf, volledige broncode bij oplevering.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, Nederland",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Webdesign en -ontwikkeling",
                    "App-ontwikkeling",
                    "Maatwerk software en webapplicaties",
                    "OpenSpec",
                    "Beoordeling van AI-code",
                    "Je eigen programmeeragent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation#webpage",
                "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation",
                "name": "AWS CloudWatch Investigation Skill | DeLaParra Services",
                "description": ">",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "inLanguage": "nl",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation#breadcrumb"
                }
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/nl"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "AWS CloudWatch Investigation Skill"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/nl/about"
            },
            {
                "@type": "SoftwareSourceCode",
                "@id": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation#skill",
                "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation",
                "name": "AWS CloudWatch Investigation Skill",
                "description": ">",
                "inLanguage": "nl",
                "license": "https://spdx.org/licenses/MIT.html",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation#dataset",
                "name": "AWS CloudWatch Investigation Skill",
                "description": "> De bestanden van deze skill zijn te downloaden als ZIP, met de licentie erbij.",
                "url": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation",
                "identifier": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation#skill"
                },
                "creditText": "github/awesome-copilot",
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://spdx.org/licenses/MIT.html",
                "isAccessibleForFree": true,
                "inLanguage": "nl",
                "dateModified": "2026-11-28T14:00:10+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/nl/kennisbank#skills",
                    "name": "Skills voor AI-programmeerassistenten",
                    "url": "https://delaparra-services.nl/nl/kennisbank"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/nl/kennisbank#catalog",
                    "name": "Datacatalogus van de kennisbank",
                    "url": "https://delaparra-services.nl/nl/kennisbank"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "aws-cloudwatch-investigation.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.csv",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-28T14:00:10+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "aws-cloudwatch-investigation.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.json",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-28T14:00:10+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "aws-cloudwatch-investigation.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.md",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-28T14:00:10+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "aws-cloudwatch-investigation.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.pdf",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-28T14:00:10+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "aws-cloudwatch-investigation.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/nl/skills/aws-cloudwatch-investigation.zip",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-28T14:00:10+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "aws-cloudwatch-investigation-files.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/aws-cloudwatch-investigation/download",
                        "inLanguage": "nl",
                        "dateModified": "2026-11-28T14:00:10+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    }
                ]
            }
        ]
    }
}