CloudWatch Logs is a managed service with one public API version (Logs_20140328); the packages
follow the current API through the official AWS SDKs. The Docker integration suite runs against the
AWS emulator motoserver/moto:5.2.4 (pinned by digest, IAM authentication on). Recorded AWS
responses drive the unit tests for everything Moto cannot reproduce.
Errors are mapped by the AWS error code; the HTTP status is only the fallback (AWS JSON services
answer HTTP 400 for throttling and access denied). The table is identical in all five languages.
AUTHENTICATION when the body names InvalidClientTokenId, SignatureDoesNotMatch, security token or UnrecognizedClient, else PERMISSION_DENIED
no
no AWS code, other status
by status (400 VALIDATION, 404 NOT_FOUND, 5xx UNAVAILABLE, network UNAVAILABLE)
5xx / network
Error messages pass through redaction and never copy the AWS error message text (it can echo log
data or request parameters); the AWS error code of a mapped error is available with
awsErrorCode(err) (Go AWSErrorCode, Rust / Python aws_error_code).
Every public function is called against Moto in the Docker suite. These paths cannot be
reproduced on Moto 5.2.4 and are covered by unit tests against recorded AWS responses (the optional
live AWS job checks them against a sandbox account):
Function / path
Why
stopQuery success
Moto answers HTTP 500 (NotImplemented); the Docker suite asserts UNAVAILABLE
query pending, Failed, Cancelled, Timeout and deadline paths; AWS @timestamp format
Moto completes every query at once and returns @timestamp in epoch ms
The API is the same in every language; only the conventions differ (naming, durations, async
model).
Topic
Difference
emf() return value
TypeScript, Python and Java return the EMF document as an object / map; Go and Rust return the JSON text of the document (the same text buildEmf returns there)
ensureLogGroup retention
Go uses RetentionDays *int (helper cloudwatchlogs.Days(n); nil = unchanged, Days(0) = never expire); the other languages use an optional number
OperationAbortedException
mapped to CONFLICT everywhere, but Java's generated ConflictException always has retryable() == false (template gap in sdk-kit 0.1.0, no constructor that sets it); the other four mark it retryable
Async
Python's AsyncCloudWatchLogsClient needs the extra [async] (aioboto3 pins a narrow boto3/botocore window; sync users keep an unpinned boto3); Rust offers a synchronous API behind the blocking feature; Java has …Async variants returning CompletableFuture
exporter() arguments
Java takes (group, stream, createGroup) positionally; the others take an options object