Skip to content

CloudWatch Logs ​

Parity grade: A · SDK aws-sdk-go-v2/service/cloudwatchlogs@v1.89.3 · last audited 2026-10-07 (2bc650bf9)

Category: Management & Governance · View PARITY.md on GitHub · All Services

In-memory CloudWatch Logs with log groups and streams, Logs Insights queries, filters, deliveries, transformers and scheduled queries.

Quick start ​

bash
export AWS_ENDPOINT_URL=http://localhost:8000

aws logs create-log-group --log-group-name /myapp/application
aws logs create-log-stream --log-group-name /myapp/application \
    --log-stream-name 2024/01/01/instance-1
aws logs put-log-events --log-group-name /myapp/application \
    --log-stream-name 2024/01/01/instance-1 \
    --log-events '[{"timestamp":1704067200000,"message":"App started"}]'
aws logs get-log-events --log-group-name /myapp/application \
    --log-stream-name 2024/01/01/instance-1
aws logs filter-log-events --log-group-name /myapp/application --filter-pattern "ERROR"
aws logs put-retention-policy --log-group-name /myapp/application --retention-in-days 30

Supported operations ​

AreaOperations
Groups and streamsCreateLogGroup, DeleteLogGroup, DescribeLogGroups, ListLogGroups, CreateLogStream, DeleteLogStream, DescribeLogStreams, PutLogGroupDeletionProtection, AssociateKmsKey, DisassociateKmsKey
EventsPutLogEvents, GetLogEvents, FilterLogEvents, GetLogRecord, GetLogObject, StartLiveTail
Retention and tagsPutRetentionPolicy, DeleteRetentionPolicy, TagLogGroup, UntagLogGroup, ListTagsLogGroup, TagResource, UntagResource, ListTagsForResource
Logs InsightsStartQuery, GetQueryResults, StopQuery, DescribeQueries, GetLogGroupFields, GetLogFields, ListLogGroupsForQuery, Put/Describe/DeleteQueryDefinition
Scheduled queriesCreate/Get/Update/Delete/ListScheduledQuery, GetScheduledQueryHistory
Metric filtersPutMetricFilter, DescribeMetricFilters, DeleteMetricFilter, TestMetricFilter
Subscription filtersPutSubscriptionFilter, DescribeSubscriptionFilters, DeleteSubscriptionFilter
Export and importCreateExportTask, DescribeExportTasks, CancelExportTask, CreateImportTask, DescribeImportTasks, DescribeImportTaskBatches, CancelImportTask
Deliveriesdelivery sources, destinations, destination policies, CreateDelivery, GetDelivery, DescribeDeliveries, DeleteDelivery, UpdateDeliveryConfiguration
Cross-account destinationsPutDestination, PutDestinationPolicy, DescribeDestinations, DeleteDestination
Account and resource policiesPut/Describe/DeleteAccountPolicy, Put/Describe/DeleteResourcePolicy
Data protection and indexingPut/Get/DeleteDataProtectionPolicy, Put/Describe/DeleteIndexPolicy, DescribeFieldIndexes, DescribeConfigurationTemplates
TransformersPutTransformer, GetTransformer, DeleteTransformer, TestTransformer
Anomaly detectionCreateLogAnomalyDetector, GetLogAnomalyDetector, ListLogAnomalyDetectors, UpdateLogAnomalyDetector, DeleteLogAnomalyDetector, ListAnomalies, UpdateAnomaly
IntegrationsPutIntegration, GetIntegration, ListIntegrations, DeleteIntegration, S3 table integration source association
Lookup tablesCreate/Get/Update/Delete/DescribeLookupTable(s)
OtherPutSyslogConfiguration, ListSyslogConfigurations, DeleteSyslogConfiguration, Get/PutStorageTierPolicy, PutBearerTokenAuthentication, ListAggregateLogGroupSummaries

Configuration ​

EnvDefaultPurpose
CLOUDWATCHLOGS_JANITOR_INTERVAL1mJanitor tick
CLOUDWATCHLOGS_MAX_RETENTION_DAYS14Retention for groups with no retention policy

Differences from AWS ​

WARNING

Retention is enforced. The janitor deletes events past the group's retentionInDays. A group with no policy keeps events for CLOUDWATCHLOGS_MAX_RETENTION_DAYS (14 by default), where AWS keeps them forever.

  • Logs Insights runs the Logs Insights QL engine only. QueryLanguage SQL and PPL are not honoured.
  • Anomaly Histogram, LogSamples, PatternString and PatternTokens are never derived from log content: there is no pattern-detection engine.
  • IncludeLinkedAccounts has no effect (no cross-account links). DataSources, FieldIndexNames and LogGroup.DataProtectionStatus are not modelled.
  • DescribeConfigurationTemplates and DescribeFieldIndexes always return an empty list.
  • Scheduled query runs do not simulate delivery, so Destinations is always empty.
  • DeliverySource.Status and StatusReason are not modelled.
  • S3 table integration associations are all top-level and ACTIVE.

Parity & Coverage ​

MetricValue
PARITY entries audited86 (86 ok)
Feature families12 (12 ok)
Known gapsnone
Structural gaps (can't be emulated)9
Deferred items0
Resource leaksclean

Structural Gaps ​

These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.

  • Anomaly Histogram/LogSamples/PatternString/PatternTokens are populated only via the AddAnomalyInternal seam: no pattern-detection ML engine exists to derive them from log content.
  • IncludeLinkedAccounts (no cross-account link model), DataSources/FieldIndexNames (no field-indexing engine) and LogGroup.DataProtectionStatus/InheritedProperties are not modeled; aggregate Limit is moot with a single bucket.
  • ScheduledQueryDestination.ProcessedIdentifier and its nested type are unmodeled: scheduled query runs do not simulate destination delivery, so Destinations is always empty.
  • DeliverySource.Status/StatusReason are not modeled: RESOURCE_DELETED needs cross-service resource-deletion tracking.
  • DescribeConfigurationTemplates (AWS's static template catalog) and DescribeFieldIndexes (needs a field-indexing engine) are empty-list void-results; no create op backs either.
  • S3TableIntegrationSource ParentSourceIdentifier/StatusReason are not modeled: no nested/derived associations or health-check failure path, so every association is a top-level ACTIVE entry.
  • StartQuery.QueryLanguage SQL/PPL is not honoured: only the Logs Insights QL engine exists.
  • StartLiveTail streaming transport: the real op is a Smithy event stream this unary handler cannot emulate; validation-only by design.
  • Import tasks: ImportStatistics/ErrorMessage and DescribeImportTaskBatches execution state need a real external-source import engine.

Audited Operations ​

86 audited operations
OperationWireErrorsStatePersist
CreateLookupTablefixedokfixedok
GetLookupTableokokokok
UpdateLookupTablefixedokfixedok
DeleteLookupTableokokokok
DescribeLookupTablesfixedokfixedok
PutSyslogConfigurationokokokok
ListSyslogConfigurationsokokokok
DeleteSyslogConfigurationokokokok
GetStorageTierPolicyokokokok
PutStorageTierPolicyokokokok
PutLogEventsokokokok
GetLogEventsokokokok
FilterLogEventsfixedfixedfixedn/a
GetLogGroupFieldsokokokn/a
GetLogFieldsokokokn/a
GetLogRecordfixedokfixedn/a
CreateLogGroupokokokok
DeleteLogGroupokokokok
DescribeLogGroupsokokokok
ListLogGroupsfixedokfixedok
ListAggregateLogGroupSummariesfixedfixedokn/a
CreateLogStreamokokokok
DeleteLogStreamokokokok
DescribeLogStreamsokokokok
PutLogGroupDeletionProtectionokokokok
PutRetentionPolicyokokokok
DeleteRetentionPolicyokokokok
PutSubscriptionFilterokokokok
DescribeSubscriptionFiltersokokokok
DeleteSubscriptionFilterokokokok
PutMetricFilterokokokok
DescribeMetricFiltersokokfixedok
DeleteMetricFilterokokokok
TestMetricFilterokokokn/a
ListTagsLogGroupokokokok
ListTagsForResourceokokokok
TagLogGroupokokokok
UntagLogGroupokokokok
TagResourceokokokok
UntagResourceokokokok
CreateExportTaskokokokok
DescribeExportTasksokokokok
CancelExportTaskokokokok
CreateImportTaskokokokok
DescribeImportTasksokokokok
CancelImportTaskokokokok
PutDestinationokokokok
DescribeDestinationsokokokok
DeleteDestinationokokokok
PutDestinationPolicyokokokok
PutDeliveryDestinationokokokok
GetDeliveryDestinationokokokok
DescribeDeliveryDestinationsfixedokokok
DeleteDeliveryDestinationokokokok
PutDeliveryDestinationPolicyokokokok
GetDeliveryDestinationPolicyokokokok
DeleteDeliveryDestinationPolicyokokokok
PutDeliverySourceokokokok
GetDeliverySourceokokokok
DescribeDeliverySourcesfixedokokok
DeleteDeliverySourceokokokok
CreateLogAnomalyDetectorokokokok
GetLogAnomalyDetectorokokokok
ListLogAnomalyDetectorsokokokok
UpdateLogAnomalyDetectorokokokok
DeleteLogAnomalyDetectorokokokok
ListAnomaliesfixedokokok
UpdateAnomalyfixedokfixedok
CreateScheduledQueryokokokok
GetScheduledQueryokokokok
ListScheduledQueriesokokokok
UpdateScheduledQueryfixedokfixedok
DeleteScheduledQueryokokokok
GetScheduledQueryHistoryfixedokokok
PutResourcePolicyfixedokfixedok
DescribeResourcePoliciesfixedokfixedok
DeleteResourcePolicyfixedokfixedok
PutIndexPolicyfixedfixedfixedok
DescribeIndexPoliciesfixedfixedfixedn/a
PutQueryDefinitionfixedokokok
DescribeQueryDefinitionsfixedokokok
DisassociateSourceFromS3TableIntegrationfixedfixedfixedok
AssociateSourceToS3TableIntegrationfixedokfixedok
ListSourcesForS3TableIntegrationfixedfixedfixedn/a
GetDataProtectionPolicyfixedokokok
DescribeAccountPoliciesokokfixedok

Audited Feature Families ​

Feature FamilyStatus
metric-filter-emissionok
metric-filter-patterns-and-defaultsok
janitor-retention-sweepok
subscription-filter-deliveryok
insights (StartQuery/GetQueryResults/StopQuery/DescribeQueries/query language)ok
export/import tasks / deliveries / anomaly detectors / scheduled queriesok
account policies / data protection/resource/index policies / transformers / integrationsok
PutIntegration—
PutBearerTokenAuthentication—
StartLiveTailok
lookup tables / syslog configurations / storage tier policy (parity-4 SDK-bump additions)ok
pagination_sweepfixed

Released under the MIT License.