aws_cloudwatch
An easy, lightweight, turnkey solution for logging with AWS CloudWatch
2.1.0
6.4K downloads/mo
#3509 most downloaded on pub.dev
Zsmerritt/Flutter_AWS_CloudWatch
What this package is like to depend on
Last release 5 months ago
23 Mar 2026
Release timing varies
gaps range from 8 days to 13 months
Nearly every release is documented
notes for 56 of 59 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
59 releases · first in 2021
3 releases in the last 12 months
see the full history below
Release timeline
59 releases · Feb 2021 to Mar 2026Releases
latest 59-
2.1.023 Mar 2026Release notes
Open source →Features
- Delete APIs:
deleteLogStreamanddeleteLogGrouponCloudWatch,CloudWatchHandler, andLogger(DeleteLogStream / DeleteLogGroup). OptionalignoreNotFoundtreatsResourceNotFoundExceptionas success for idempotent cleanup.CloudWatchHandlerremoves matching cached loggers after success. - Concurrency:
Loggeruses asynchronizedLockso overlappinglogcalls serializesendLogs/ PutLogEvents work against the sharedlogStack(avoids races between pop/prepend and AWS calls). - PutLogEvents validation:
validatePutLogEventsBatchandorderPutLogEventsBatchenforce client-side checks aligned with AWS (non-empty batch,timestamp/messageshape, 24h batch span, future and retention window heuristics). Invalid batches fail before the request is sent. - Partial HTTP 200 responses: If PutLogEvents returns HTTP 200 with
rejectedLogEventsInfo, the client throwsCloudWatchExceptionwithtype: RejectedLogEventsInfo(and requeues the batch when appropriate).
Fixes
- Request signing: Stopped sending
X-Amz-Expireson CloudWatch Logs requests (it was conflated with HTTP timeout; not appropriate for this API). - Temporary credentials:
x-amz-security-tokenuses the exact header keyaws_requestexpects when buildingsignedHeaders.
Error recovery
- Resource not found: Message-shape heuristics (
resourceNotFoundMessageImpliesMissingLogStream/resourceNotFoundMessageImpliesMissingLogGroup) refine auto-recovery when AWS reports missing log stream or log group.
Dependencies
- Requires aws_request
^2.1.0.
Tooling, analysis, and tests
- Analysis:
analysis_options.yamlincludespackage:lints/core.yamlplus an expanded custom lint rule set; added alintsdev dependency.CloudWatchHandlerconstructor parameters use explicit types for stricter public API checks. - Tests: Added
cloudwatch_logs_compliance_test.dart,strict_put_log_events_mock.dart, andtest/integration/live_aws_cloudwatch_logs_test.dart(opt-in live AWS); extended unit tests. Addeddart_test.yaml(test_on: vm); run integration tests serially, e.g.dart test test/integration --concurrency=1. - Examples: UTC
DateTimetimestamps (nointl); examplepubspec.yamlusespath: ../,publish_to: none, and alintsdev dependency for nested-package analysis. - Repository:
.gitignoreincludes.cursor/,.vscode/, and.env*.
- Delete APIs:
-
2.0.021 Mar 2026Release notes
Open source →Breaking changes
- Dependency: Requires
aws_request^2.0.0 (drops the transitiveintldependency from olderaws_requestreleases).MockAwsRequestnow uses a named-parameter constructor; this package’s mock path was updated accordingly. - CloudWatch Logs sequence tokens:
PutLogEventsrequests no longer includesequenceToken, and client-side handling forInvalidSequenceTokenExceptionandDataAlreadyAcceptedExceptionhas been removed. If you relied on the previous retry/token-sync behavior, validate logging under concurrent or high-throughput use. AwsResponse:nextSequenceTokenandexpectedSequenceTokenwere removed from the parsed response model (primarily internal; update any code that imported or inspected these fields).
Features
- Larger log events: Default maximum message size now matches the current AWS per-event limit (~1 MiB).
awsMaxBytesPerMessageis 1,048,550 bytes (previously 262,116). Split/batch logic and tests were updated accordingly.
Documentation
- README: Restructured with API tables, clearer temporary credential flow (
awsSessionToken), updated throttling notes, and documentation for the ~1 MiB message limit and tuning parameters. - Doc fixes: Public docs now state that the default
largeMessageBehaviorissplit(nottruncate) and that per-message overrides use a minimum of 22 bytes and maximum 1,048,550 bytes.
Fixes
- Example:
example/aws_cloudwatch_quickstart.dartnow sends errors to_errorGroupand normal logs to_logGroup(the two branches were reversed).
- Dependency: Requires
-
2.0.0+121 Mar 2026Nothing published for this version
-
1.1.022 Jun 2025 -
1.0.121 May 2024 -
1.0.031 May 2023Release notes
Open source →- Requires Dart 3.0 or later
- Updated to
aws_request^1.0.0 - Updated to
http^1.0.0
Release notes
Open source →- Requires Dart 3.0 or later
- Updated to
aws_request^1.0.0 - Updated to
http^1.0.0
-
0.6.031 May 2023Release notes
Open source →- Updated to aws_request 0.5.0 to support
intl0.18.0+ - Fixed tests broken by dart update
- Removed deprecated analysis options
Release notes
Open source →- Updated to aws_request 0.5.0 to support
intl0.18.0+ - Fixed tests broken by dart update
- Removed deprecated analysis options
- Updated to aws_request 0.5.0 to support
-
0.5.722 Sep 2022Release notes
Open source →- Updated default message delay to 200ms
- Updated default
largeMessageBehaviorto split - Updated documentation
-
0.5.7+130 Sep 2022 -
0.5.7+210 Feb 2023Release notes
Open source →[0.5.7+2] - 2023/02/09
- Formatted project to comply with new dart formatting rules
- Minor housekeeping to fix running tests & lint deprecations
Release notes
Open source →- Formatted project to comply with new dart formatting rules
- Minor housekeeping to fix running tests & lint deprecations
-
0.5.621 Sep 2022Release notes
Open source →[0.5.6+1] - 2022/09/20
- Fixed failing test
[0.5.6] - 2022/09/20
- Added timestamped message hash and message number to split messages
-
0.5.6+121 Sep 2022 -
0.5.513 May 2022 -
0.5.425 Mar 2022Release notes
Open source →[0.5.4] - 2022/03/24
- Added explicit types to constructor arguments that were missing them
- Added dynamically adjust timeouts
- Reduced repeated CloudwatchException Timeout errors
- Updated README with details about new features
- Added unit tests
Release notes
Open source →- Added explicit types to constructor arguments that were missing them
- Added dynamically adjust timeouts
- Reduced repeated CloudwatchException Timeout errors
- Updated README with details about new features
- Added unit tests
-
0.5.306 Feb 2022Release notes
Open source →[0.5.3] - 2022/02/06
- Reduced repeated failed lookup printout
- Added unit tests
- Fixed 2.10 analyzer errors
Release notes
Open source →- Reduced repeated failed lookup printout
- Added unit tests
- Fixed 2.10 analyzer errors
-
0.5.226 Jan 2022Release notes
Open source →- Fixed issue where message bytes exceeded max in rare cases with many small messages
- Added optional arguments
maxBytesPerMessageChanges how large each message can be before [largeMessageBehavior] takes effect. Min 5, Max 262116maxBytesPerRequestChanges how many bytes can be sent in each API request before a second request is made.maxMessagesPerRequestChanges the maximum number of messages that can be sent in each API request
- Added special case for timeout exception with detail message & steps forward
- Updated README with info on new optional arguments
- Added special case for
InvalidParameterExceptionalong with instructions for reporting them
-
0.5.125 Jan 2022 -
0.5.021 Jan 2022Release notes
Open source →Breaking Changes:
- Removed
setDelay&setLoggingParameters - Added
groupName&streamNameas required arguments toCloudWatch - Changed
awsAccessKey&awsSecretKeyto named arguments - Changed
CloudWatchHandler.logargumentmsgtomessageto be more consistent
General Changes and Fixes
- Refactored entire library to be highly testable
- Added lots of unit tests
- Fixed issue where delay, requestTimeout, and retries could be set negative
- Updated examples to reflect breaking changes
- Added stricter analyzer rules
- Removed
-
0.4.711 Jan 2022Release notes
Open source →- Added note about android permissions to readme
- Added coverage
- Updated
aws_requestto 0.3.0 to resolve issues on web [khurram72]
-
0.4.605 Jan 2022Release notes
Open source →- Added support for AWS temporary credentials with session tokens (#7)
- Set X-Amz-Expires with requestTimeout for improved security
- Fixed some spelling mistakes
- Updated readme with information about using session tokens
- Updated readme example 3 to log errors to different log group
-
0.4.6+106 Jan 2022Release notes
Open source →- Added session tokens to CloudWatch constructor [khurram72] (#8)
- Fixed issue where session token wasn't sent with some requests [khurram72] (#8)
-
0.4.6+209 Jan 2022 -
0.4.523 Dec 2021 -
0.4.403 Oct 2021Release notes
Open source →- DNS lookup failures are now silenced by default (raiseFailedLookups flag)
- Added better comments throughout
- Added tests for cloudwatch, handler, and logStack
- Refactored existing tests into different files based on subject
- Added AwsResponse class
- Refactored classes into separate files for better readability
- Updating attributes of a handler now updates its child instances
- Made several more private classes / functions / attributes public for testing
- Reorganized readme and added section for Failed DNS Lookups
- Added toString to CloudWatchException for easier debugging in IDE
- Added better recovery from failed group and stream creation
-
0.4.329 Sep 2021Release notes
Open source →- Added support for more automatic error recovery
- Made CloudWatchLogStack & CloudWatchLog public classes
- Added tests for CloudWatchLogStack
- Added more debug logs
- Added github CI
- Fixed issue with setLoggingParameters found in tests
- Added CI pipeline badge
-
0.4.217 Sep 2021Release notes
Open source →- Added ability to recover from InvalidSequenceTokenException
- Updated prepend method to slightly faster one
- Refactored code for better separation and readability
- Removed unneeded flutter dependency to allow native and js compatibility
- Updated README
- Changed to MIT license
- Fixed an error message
- Fixed error in documentation
-
0.4.116 Sep 2021Release notes
Open source →- Updated documentation to remove references to splitLargeMessages
- Fixed issue where messages smaller than 262118 utf8 bytes were not sent
-
0.4.016 Sep 2021Release notes
Open source →- Fixed issue with API requests not waiting delay when the log queue backed up
- Added CloudWatchLargeMessages to allow for multiple large message behaviors
- Updated documentation to follow dart conventions and work better with Intellij
- Replaced splitLargeMessages with CloudWatchLargeMessages
- Removed deprecated CloudWatch.withDelay constructor
- Removed deprecated CloudWatchException cause field
-
0.3.112 Sep 2021Release notes
Open source →- Refactored log stack into its own class for better readability
- Added logGroupName and logStreamName validation
- Added API retries functionality if request fails
- Added splitLargeMessages functionality that automatically resizes out of spec messages
- Improved error handling and recovery. When requests fail logs are now prepended and requeued
- Added checks for AWS limits and adjust how messages are sent accordingly
- Added optional API request timeout parameter
- Updated aws_request version for improved functionality + bugfixes
- Fixed an issue with empty errors being thrown / returned
- Refactored code for better reusability
-
0.3.025 Aug 2021Release notes
Open source →- Added stack trace to CloudWatchException class
- Fixed area where empty CloudWatchException was created
- Fixed issue with error handling causing uncatchable exception
- Changed delay to a Duration
- Added logMany to both CloudWatch and CloudWatchHandler
- Changed setVerbosity function to private
-
0.3.0+125 Aug 2021 -
0.3.0+226 Aug 2021Release notes
Open source →- Updated readme and example with delay type change
- Updated function comments with updated wording referencing delay parameter
-
0.3.0+326 Aug 2021 -
0.2.031 Jul 2021Release notes
Open source →- Added CloudWatchHandler class to easily manage multiple CloudWatch instances
- Added quick start logging example file
- Automatically creates Log Groups that don't exist
- Updated the README with info on CloudWatchHandler and quick start
- Improved code readability
- Updated to new version of aws_request
- Added min 0 delay in place it was missing
-
0.2.0+131 Jul 2021Release notes
Open source →- Fixed naming scheme for optional variables in constructor
- Added groupName and streamName as synonyms for logGroupName and logStreamName
-
0.2.0+231 Jul 2021Release notes
Open source →- Applied naming fix to CloudWatchHandler instance constructor
- Added test coverage for CloudWatchHandler
- Fixed issue with synonym setters
-
0.2.0+303 Aug 2021Release notes
Open source →- Added optimization to reduce lock clutter
- Replaced sleep command with Future.delayed to avoid pausing app
-
0.2.0+403 Aug 2021 -
0.1.1214 Jul 2021 -
0.1.1110 Jul 2021Release notes
Open source →QOL update
- Fully removed optional deprecated xAmzTarget argument from main constructor (deprecated in 0.1.0)
- Added optional arguments for group / stream name to both constructors
- Added missing method setLoggingParameters that was shown in error message when group / stream name was null
- Updated all examples to show different group / stream name instantiations
- Added optional delay argument to main constructor and deprecated withDelay constructor
- Expanded readme
-
0.1.1002 Jul 2021Release notes
Open source →- Added web compatibility
- Moved synchronous calls to synchronized package
- Reformatted code to pass static analysis
- Fixed issue with error catching for HttpExceptions
-
0.1.909 Jun 2021Release notes
Open source →- Updated aws_request version to fix null safety typing issue
- Fixed issue with aws errors being rethrown incorrectly
-
0.1.819 May 2021 -
0.1.719 May 2021Release notes
Open source →- Moved to new version of aws_requests to fix hard coded region bug
- Improved error handling
-
0.1.627 Mar 2021Release notes
Open source →- Added console output logging with 4 verbosity levels
- Added optional delay parameter to address possible rate limiting
- Updated readme with new rate limiting example
-
0.1.526 Mar 2021 -
0.1.426 Mar 2021 -
0.1.325 Mar 2021 -
0.1.224 Mar 2021 -
0.1.124 Mar 2021 -
0.1.024 Mar 2021Release notes
Open source →- Updated dependencies for null safety
- Put deprecation warning on xAmzTarget (formerly serviceInstance
- Updated example and docs to reflect changes with xAmzTarget
- Added exception if PutLogEvents returns a status code other than 200
-
0.0.819 May 2021Nothing published for this version
-
0.0.727 Mar 2021Nothing published for this version
-
0.0.626 Mar 2021Release notes
Open source →Non-null Safety Update
- Updated examples
- Fixed issue with attempted logging before logstream creation was finished
-
0.0.526 Mar 2021 -
0.0.426 Mar 2021Release notes
Open source →Non-null Safety Update
- Put deprecation warning on xAmzTarget (formerly serviceInstance)
- Updated example and docs to reflect changes with xAmzTarget
- Added exception if PutLogEvents returns a status code other than 200
- Updated aws_request version to fix unicode error
- Put deprecation warning on xAmzTarget (formerly serviceInstance)
-
0.0.311 Feb 2021 -
0.0.211 Feb 2021 -
0.0.110 Feb 2021