aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

aws logs tail --follow never exits

Open BeyondEvil opened this issue 1 year ago • 0 comments

Describe the bug

aws logs tail <log_group> --log-stream-names <stream name> --follow

Never exits even tho no more logs are coming in due to the service (Fargate Task in this case) has exited.

This means I have to quit the command using Ctrl-C and hence can't use it programatically.

Expected Behavior

aws logs tail should time out when no more logs are coming in.

Current Behavior

aws logs tail <log_group> --log-stream-names <stream name> --follow

Never exits even tho no more logs are coming in due to the service (Fargate Task in this case) has exited.

Reproduction Steps

  • Start a Fargate task
  • Run the command
  • Observe command not finish when task is finished

This is reproducibel on both Mac and Linux systems.

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/2.13.33 Python/3.11.6 Darwin/23.2.0 exe/x86_64 prompt/off

Environment details (OS name and version, etc.)

macOS (M2) Sonoma 14.2.1

BeyondEvil avatar Mar 13 '24 13:03 BeyondEvil