I am trying to connect to aws via aws cli through gossamer3 , but when I am trying to fetch running logs into my cmd prompt I am getting the following error. I am able to view the logs via cloudwatch in aws management console. But unable to bring the logs in the cmd prompt. In cloudwatch the path to the logs ->CloudWatch>Log groups>/aws/ecs/oa/moa/qa>/moa-ingestion-svc/moa-ingestion-svc/f184eed39ed94dc0b640eaae5e2c2aea
Log Configuration
Log driver: awslogs View logs in CloudWatch
Key Value
awslogs-group /aws/ecs/oa/moa/qa
awslogs-region us-east-1
awslogs-stream-prefix /moa-ingestion-svc
But when I am trying to bring this via aws cli I am getting the following error. Anything wrong in my aws cli command
$ aws logs tail /aws/ecs/oa/moa/qa/moa-ingestion-svc/moa-ingestion-svc --follow --since 10m --profile pub-mfa --region us-east-1
An error occurred (InvalidParameterException) when calling the FilterLogEvents operation: 1 validation error detected: Value 'C:/Program Files/Git/aws/ecs/oa/moa/qa/moa-ingestion-svc/moa-ingestion-svc' at 'logGroupName' failed to satisfy constraint: Member must satisfy regular expression pattern: [\.\-_/#A-Za-z0-9]+
You appear to be running git bash on Windows, which is expanding the provided log group name as if it were a local folder name.
To fix this, disable expansion as follows:
$ MSYS_NO_PATHCONV=1 aws logs tail /aws/ecs/oa/moa/qa/...
Also, at least in the awscli version aws-cli/2.11.2 that I am running, the log group name and log stream prefix are supplied independently, as follows:
aws logs tail <group_name> --log-stream-name-prefix <value>