Skip to content

AWS CloudWatchLogs: open real-cloud parity gaps #1476

Open

Description

@NitinKumar004

cloudemu's CloudWatchLogs emulation still differs from real AWS in the ways listed below. Each item is a separate fix, so pick any one and open a PR for it against development. Comment here with the item you're taking so two people don't work on the same one.

Check the expected behaviour against the AWS API reference and the real CLI or SDK. A good fix goes in the provider (providers/aws/...) so the Go library and cloudemu serve behave the same, and adds a test that fails before the fix. See CONTRIBUTING.md for setup.

High

  • Logs Insights absent: StartQuery/GetQueryResults/StopQuery/DescribeQueries/GetLogRecord/GetLogGroupFields (server/aws/cloudwatchlogs/handler.go dispatch has no Insights cases)
  • Filter-pattern language unimplemented (whole-string substring) for FilterLogEvents/metric/subscription filters

Medium

  • DeleteRetentionPolicy missing (UnknownOperationException); no way back to never-expire (not in handler.go switch)
  • ListLogGroups (2023 account-level op) not wired to JSON-RPC dispatcher (driver has ListLogGroups but handler.go has no case)
  • CreateExportTask/DescribeExportTasks/CancelExportTask (S3 export) missing
  • PutLogEvents accepts events older than 14 days / retention (no InvalidParameterException) (no timestamp-window check in server/aws/cloudwatchlogs/operations.go)
  • PutLogEvents accepts events more than 2h in the future
  • Retention cutoff applied in GetLogEvents but not FilterLogEvents (contradictory reads) (cloudwatchlogs.go filterEvents takes retentionCutoff; matchEvents (FilterLogEvents) has none)
  • Retention expiry is synchronous read-time hiding with no grace period (real AWS deletes async)

Low

  • Put/Get/DeleteDataProtectionPolicy missing
  • PutAccountPolicy/DescribeAccountPolicies; Associate/DisassociateKmsKey; StartLiveTail missing
  • PutLogEvents nextSequenceToken hardcoded "0" (operations.go putLogEvents writes NextSequenceToken "0"; response-shape realism)

Activity

  1. added
    help wantedExtra attention is needed
    awsAmazon Web Services
    aws-parityAWS real-cloud parity gap
    P1High priority
    bugSomething isn't working
    and removed
    help wantedExtra attention is needed
    on Oct 6, 2026
  2. NitinKumar004 commented on Oct 21, 2026

    @NitinKumar004
    CollaboratorAuthor

    #1655 fixed DeleteRetentionPolicy, ListLogGroups, the PutLogEvents 14-day / retention / 2-hour window with rejectedLogEventsInfo, retention in FilterLogEvents and a real sequence token. It also adds Associate/DisassociateKmsKey and kmsKeyId/logGroupClass on CreateLogGroup. Expired events are now purged, but the deletion lag of real AWS isn't modelled, so that item stays open.

  3. NitinKumar004 commented on Oct 21, 2026

    @NitinKumar004
    CollaboratorAuthor

    #1656 adds the filter-pattern language for FilterLogEvents, metric and subscription filters, and TestMetricFilter, covering unstructured terms, %regex% and JSON patterns, with AWS's syntax limits and regex quotas. Space-delimited patterns follow in a separate PR, so that item stays open.

  4. NitinKumar004 commented on Oct 21, 2026

    @NitinKumar004
    CollaboratorAuthor

    #1658 adds space-delimited patterns and metric value extraction ($field, $N, $.path). With #1656, the filter-pattern language now works for FilterLogEvents, metric filters and subscription filters, so that item is done.

  5. NitinKumar004 commented on Oct 22, 2026

    @NitinKumar004
    CollaboratorAuthor

    #1660 adds metric filter transformation parity:

    • Dimensions are taken from extracted fields, with at most 3, and only on structured patterns.
    • defaultValue is published at most once per minute, and never in a minute that had a match.
    • unit is supported.
    • Each matching event becomes its own sample, so SampleCount, Min and Max match AWS.
    • PutMetricFilter validation and quotas are in place.
    • DescribeMetricFilters supports its filters and paging.
  6. NitinKumar004 commented on Oct 22, 2026

    @NitinKumar004
    CollaboratorAuthor

    #1661 adds the six Logs Insights ops (StartQuery, GetQueryResults, StopQuery, DescribeQueries, GetLogRecord, GetLogGroupFields).

    The query engine supports fields, filter, sort, limit and display, plus the system fields and JSON field discovery. Queries move through the AWS lifecycle states. The 100-concurrent-query limit and the 60-minute timeout are enforced, and a bad query returns MalformedQueryException with a compile error.

    stats, parse and dedup follow in the next PR, so the Insights item stays open.

  7. NitinKumar004 commented on Oct 22, 2026

    @NitinKumar004
    CollaboratorAuthor

    #1664 adds the Logs Insights stats, parse and dedup commands, plus bin, datefloor and dateceil. Chaining follows the documented rules. Together with #1661, the Logs Insights item is done.

  8. NitinKumar004 commented on Oct 23, 2026

    @NitinKumar004
    CollaboratorAuthor

    #1686 adds export tasks to S3 (CreateExportTask, DescribeExportTasks, CancelExportTask).

    • Tasks move through the AWS status lifecycle, with one active task per account.
    • The bucket-policy check follows AWS.
    • Exported files are gzipped with AWS's object key layout.
    • What isn't modelled is listed in the logging non-goals.
  9. NitinKumar004 commented on Oct 23, 2026

    @NitinKumar004
    CollaboratorAuthor

    #1700 adds data protection policies, with real masking at ingest and unmask, and account policies of all types. With #1655, Associate/DisassociateKmsKey is also done, so the only open parts of the combined Low line are StartLiveTail and the 72h retention deletion lag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityawsAmazon Web Servicesaws-parityAWS real-cloud parity gapbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions