Skip to content

Resolve CloudTrail trails by ARN in start/stop_logging - #10119

Open
Devil1716 wants to merge 1 commit into
getmoto:masterfrom
Devil1716:fix/cloudtrail-start-stop-logging-by-arn
Open

Resolve CloudTrail trails by ARN in start/stop_logging#10119
Devil1716 wants to merge 1 commit into
getmoto:masterfrom
Devil1716:fix/cloudtrail-start-stop-logging-by-arn

Conversation

@Devil1716

Copy link
Copy Markdown

Summary

  • Route start_logging / stop_logging through the existing ARN-tolerant get_trail() helper.
  • Missing trails now raise TrailNotFoundException instead of an unhandled KeyError (HTTP 500).

Test plan

  • pytest test_start_and_stop_logging_by_arn
  • pytest test_start_logging_unknown_trail_raises_not_found
  • Existing test_get_trail_status_after_starting still passes

Fixes #10107

AWS StartLogging/StopLogging accept trail name or ARN. Route these
through get_trail() so ARN lookups work and missing trails raise
TrailNotFoundException instead of KeyError/HTTP 500.

Fixes getmoto#10107

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CloudTrail start_logging/stop_logging raise KeyError when called with a trail ARN

1 participant