I am trying to retrieve a log with aws logs, but the log group name is improperly processed by the aws cli command:
$ aws logs get-log-events --log-group-name /aws/lambda/mySkillName --log-stream-name '2018/11/28/[$LATEST]4e288b653df8409e977aa4093303761b'
An error occurred (InvalidParameterException) when calling the GetLogEvents operation: 1 validation error detected: Value 'C:/Program Files/Git/aws/lambda/mySkillName' at 'logGroupName' failed to satisfy constraint: Member must satisfy regular expression pattern: [.-_/#A-Za-z0-9]+`
Why is aws-cli prepending C:/Program Files/Git to the log group name?
I am running this on Windows 10. I get similar results in Git-Bash and cygwin bash.
More information:
With the --debug flag:
$ aws logs get-log-events --debug --log-group-name /aws/lambda/mySkillName --log-stream-name '2018/11/28/[$LATEST]4e288b653df8409e977aa4093303761b' 2018-12-06 06:54:13,744 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.16.65 Python/2.7.13 Windows/10 botocore/1.12.55 2018-12-06 06:54:13,746 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['logs', 'get-log-events', '--debug', '--log-group-name', 'C:/Program Files/Git/aws/lambda/mySkillName', '--log-stream-name', '2018/11/28/[$LATEST]4e288b653df8409e977aa4093303761b']
Um, no, those are not the arguments I entered to the CLI. Something has changed the --log-group-name argument.
What is it doing this?