PackageTrack
Sign in Get early access

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 2026
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 59
  1. 2.1.0 23 Mar 2026
    Release notes

    Features

    • Delete APIs: deleteLogStream and deleteLogGroup on CloudWatch, CloudWatchHandler, and Logger (DeleteLogStream / DeleteLogGroup). Optional ignoreNotFound treats ResourceNotFoundException as success for idempotent cleanup. CloudWatchHandler removes matching cached loggers after success.
    • Concurrency: Logger uses a synchronized Lock so overlapping log calls serialize sendLogs / PutLogEvents work against the shared logStack (avoids races between pop/prepend and AWS calls).
    • PutLogEvents validation: validatePutLogEventsBatch and orderPutLogEventsBatch enforce client-side checks aligned with AWS (non-empty batch, timestamp / message shape, 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 throws CloudWatchException with type: RejectedLogEventsInfo (and requeues the batch when appropriate).

    Fixes

    • Request signing: Stopped sending X-Amz-Expires on CloudWatch Logs requests (it was conflated with HTTP timeout; not appropriate for this API).
    • Temporary credentials: x-amz-security-token uses the exact header key aws_request expects when building signedHeaders.

    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.yaml includes package:lints/core.yaml plus an expanded custom lint rule set; added a lints dev dependency. CloudWatchHandler constructor parameters use explicit types for stricter public API checks.
    • Tests: Added cloudwatch_logs_compliance_test.dart, strict_put_log_events_mock.dart, and test/integration/live_aws_cloudwatch_logs_test.dart (opt-in live AWS); extended unit tests. Added dart_test.yaml (test_on: vm); run integration tests serially, e.g. dart test test/integration --concurrency=1.
    • Examples: UTC DateTime timestamps (no intl); example pubspec.yaml uses path: ../, publish_to: none, and a lints dev dependency for nested-package analysis.
    • Repository: .gitignore includes .cursor/, .vscode/, and .env*.
    Open source →
  2. 2.0.0 21 Mar 2026
    Release notes

    Breaking changes

    • Dependency: Requires aws_request ^2.0.0 (drops the transitive intl dependency from older aws_request releases). MockAwsRequest now uses a named-parameter constructor; this package’s mock path was updated accordingly.
    • CloudWatch Logs sequence tokens: PutLogEvents requests no longer include sequenceToken, and client-side handling for InvalidSequenceTokenException and DataAlreadyAcceptedException has been removed. If you relied on the previous retry/token-sync behavior, validate logging under concurrent or high-throughput use.
    • AwsResponse: nextSequenceToken and expectedSequenceToken were 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). awsMaxBytesPerMessage is 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 largeMessageBehavior is split (not truncate) and that per-message overrides use a minimum of 22 bytes and maximum 1,048,550 bytes.

    Fixes

    • Example: example/aws_cloudwatch_quickstart.dart now sends errors to _errorGroup and normal logs to _logGroup (the two branches were reversed).
    Open source →
  3. 2.0.0+1 21 Mar 2026

    Nothing published for this version

  4. 1.1.0 22 Jun 2025
    Release notes
    • Updated to aws_request ^1.1.0
    • Removed outdated lint rule
    Open source →
    Release notes
    • Updated to aws_request ^1.1.0
    • Removed outdated lint rule
    Open source →
  5. 1.0.1 21 May 2024
    Release notes
    • Updated to aws_request ^1.0.1
    Open source →
    Release notes
    • Updated to aws_request ^1.0.1
    Open source →
  6. 1.0.0 31 May 2023
    Release notes
    • Requires Dart 3.0 or later
    • Updated to aws_request ^1.0.0
    • Updated to http ^1.0.0
    Open source →
    Release notes
    • Requires Dart 3.0 or later
    • Updated to aws_request ^1.0.0
    • Updated to http ^1.0.0
    Open source →
  7. 0.6.0 31 May 2023
    Release notes
    • Updated to aws_request 0.5.0 to support intl 0.18.0+
    • Fixed tests broken by dart update
    • Removed deprecated analysis options
    Open source →
    Release notes
    • Updated to aws_request 0.5.0 to support intl 0.18.0+
    • Fixed tests broken by dart update
    • Removed deprecated analysis options
    Open source →
  8. 0.5.7 22 Sep 2022
    Release notes
    • Updated default message delay to 200ms
    • Updated default largeMessageBehavior to split
    • Updated documentation
    Open source →
  9. 0.5.7+1 30 Sep 2022
    Release notes
    • Updated README and fixed examples
    Open source →
  10. 0.5.7+2 10 Feb 2023
    Release notes

    [0.5.7+2] - 2023/02/09

    • Formatted project to comply with new dart formatting rules
    • Minor housekeeping to fix running tests & lint deprecations
    Open source →
    Release notes
    • Formatted project to comply with new dart formatting rules
    • Minor housekeeping to fix running tests & lint deprecations
    Open source →
  11. 0.5.6 21 Sep 2022
    Release notes

    [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
    Open source →
    Release notes
    • Added timestamped message hash and message number to split messages
    Open source →
  12. 0.5.6+1 21 Sep 2022
    Release notes
    • Fixed failing test
    Open source →
  13. 0.5.5 13 May 2022
    Release notes

    [0.5.5] - 2022/05/13

    • Added response status code to CloudWatchException
    Open source →
    Release notes
    • Added response status code to CloudWatchException
    Open source →
  14. 0.5.4 25 Mar 2022
    Release notes

    [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
    Open source →
    Release notes
    • 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
    Open source →
  15. 0.5.3 06 Feb 2022
    Release notes

    [0.5.3] - 2022/02/06

    • Reduced repeated failed lookup printout
    • Added unit tests
    • Fixed 2.10 analyzer errors
    Open source →
    Release notes
    • Reduced repeated failed lookup printout
    • Added unit tests
    • Fixed 2.10 analyzer errors
    Open source →
  16. 0.5.2 26 Jan 2022
    Release notes
    • Fixed issue where message bytes exceeded max in rare cases with many small messages
    • Added optional arguments
      • maxBytesPerMessage Changes how large each message can be before [largeMessageBehavior] takes effect. Min 5, Max 262116
      • maxBytesPerRequest Changes how many bytes can be sent in each API request before a second request is made.
      • maxMessagesPerRequest Changes 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 InvalidParameterException along with instructions for reporting them
    Open source →
  17. 0.5.1 25 Jan 2022
    Release notes
    • Updated aws_request version
    Open source →
  18. 0.5.0 21 Jan 2022
    Release notes

    Breaking Changes:

    • Removed setDelay & setLoggingParameters
    • Added groupName & streamName as required arguments to CloudWatch
    • Changed awsAccessKey & awsSecretKey to named arguments
    • Changed CloudWatchHandler.log argument msg to message to 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
    Open source →
  19. 0.4.7 11 Jan 2022
    Release notes
    • Added note about android permissions to readme
    • Added coverage
    • Updated aws_request to 0.3.0 to resolve issues on web [khurram72]
    Open source →
  20. 0.4.6 05 Jan 2022
    Release notes
    • 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
    Open source →
  21. 0.4.6+1 06 Jan 2022
    Release notes
    • Added session tokens to CloudWatch constructor [khurram72] (#8)
    • Fixed issue where session token wasn't sent with some requests [khurram72] (#8)
    Open source →
  22. 0.4.6+2 09 Jan 2022
    Release notes
    • Updated aws_request version to fix issue related to web requests
    Open source →
  23. 0.4.5 23 Dec 2021
    Release notes
    • Fixed issue related to using static logStreamName and logGroupName (#6)
    Open source →
  24. 0.4.4 03 Oct 2021
    Release notes
    • 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
    Open source →
  25. 0.4.3 29 Sep 2021
    Release notes
    • 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
    Open source →
  26. 0.4.2 17 Sep 2021
    Release notes
    • 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
    Open source →
  27. 0.4.1 16 Sep 2021
    Release notes
    • Updated documentation to remove references to splitLargeMessages
    • Fixed issue where messages smaller than 262118 utf8 bytes were not sent
    Open source →
  28. 0.4.0 16 Sep 2021
    Release notes
    • 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
    Open source →
  29. 0.3.1 12 Sep 2021
    Release notes
    • 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
    Open source →
  30. 0.3.0 25 Aug 2021
    Release notes
    • 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
    Open source →
  31. 0.3.0+1 25 Aug 2021
    Release notes
    • Switched to new aws_cloudwatch version
    Open source →
  32. 0.3.0+2 26 Aug 2021
    Release notes
    • Updated readme and example with delay type change
    • Updated function comments with updated wording referencing delay parameter
    Open source →
  33. 0.3.0+3 26 Aug 2021
    Release notes
    • Updated setDelay to use Duration
    Open source →
  34. 0.2.0 31 Jul 2021
    Release notes
    • 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
    Open source →
  35. 0.2.0+1 31 Jul 2021
    Release notes
    • Fixed naming scheme for optional variables in constructor
    • Added groupName and streamName as synonyms for logGroupName and logStreamName
    Open source →
  36. 0.2.0+2 31 Jul 2021
    Release notes
    • Applied naming fix to CloudWatchHandler instance constructor
    • Added test coverage for CloudWatchHandler
    • Fixed issue with synonym setters
    Open source →
  37. 0.2.0+3 03 Aug 2021
    Release notes
    • Added optimization to reduce lock clutter
    • Replaced sleep command with Future.delayed to avoid pausing app
    Open source →
  38. 0.2.0+4 03 Aug 2021
    Release notes
    • Fixed delay from seconds to milliseconds
    Open source →
  39. 0.1.12 14 Jul 2021
    Release notes
    • Fixed bug where delay was input in seconds instead of milliseconds
    Open source →
  40. 0.1.11 10 Jul 2021
    Release notes

    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
    Open source →
  41. 0.1.10 02 Jul 2021
    Release notes
    • Added web compatibility
    • Moved synchronous calls to synchronized package
    • Reformatted code to pass static analysis
    • Fixed issue with error catching for HttpExceptions
    Open source →
  42. 0.1.9 09 Jun 2021
    Release notes
    • Updated aws_request version to fix null safety typing issue
    • Fixed issue with aws errors being rethrown incorrectly
    Open source →
  43. 0.1.8 19 May 2021
    Release notes
    • Fixed null safety issue with previous release
    Open source →
  44. 0.1.7 19 May 2021
    Release notes
    • Moved to new version of aws_requests to fix hard coded region bug
    • Improved error handling
    Open source →
  45. 0.1.6 27 Mar 2021
    Release notes
    • Added console output logging with 4 verbosity levels
    • Added optional delay parameter to address possible rate limiting
      • Updated readme with new rate limiting example
    Open source →
  46. 0.1.5 26 Mar 2021
    Release notes
    • Fixed issue with attempted logging before logstream creation finished
    Open source →
  47. 0.1.4 26 Mar 2021
    Release notes
    • Fixed issue with sending empty logs
    Open source →
  48. 0.1.3 25 Mar 2021
    Release notes
    • Updated aws_request version to fix unicode error
    Open source →
  49. 0.1.2 24 Mar 2021
    Release notes
    • Actually migrated to null safety
    Open source →
  50. 0.1.1 24 Mar 2021
    Release notes
    • Removed two more references to ServiceInstance
    Open source →
  51. 0.1.0 24 Mar 2021
    Release notes
    • 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
    Open source →
  52. 0.0.8 19 May 2021

    Nothing published for this version

  53. 0.0.7 27 Mar 2021

    Nothing published for this version

  54. 0.0.6 26 Mar 2021
    Release notes

    Non-null Safety Update

    • Updated examples
    • Fixed issue with attempted logging before logstream creation was finished
    Open source →
  55. 0.0.5 26 Mar 2021
    Release notes

    Non-null Safety Update

    • Fixed issue with sending empty logs
    Open source →
  56. 0.0.4 26 Mar 2021
    Release notes

    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
    Open source →
  57. 0.0.3 11 Feb 2021
    Release notes
    • Updated dependencies
    Open source →
  58. 0.0.2 11 Feb 2021
    Release notes
    • Added example
    Open source →
  59. 0.0.1 10 Feb 2021
    Release notes
    • Added initial code for sending logs to cloudwatch
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive