0

with --help i can see

Invoking a Lambda function using input from stdin

$ echo '{"message": "Hey, are you there?" }' | sam local invoke "HelloWorldFunction" --event -

And it works as such. But trying to make use of stdin without piping an echo:

sam local invoke "HelloWorldFunction" --event -

it just lets me write without end. I've tried Ctrl+D but it just prints ^D

And of course Ctrl+C aborts the command without executing.

How can I use pure stdin for it? How can i signal the end of input?

note: i'm using git bash for windows 10.

malarres
  • 2,941
  • 1
  • 21
  • 35

1 Answers1

1

ENTER then CTRL+Z then ENTER (again) will send an EOF in Windows.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Harrison H
  • 30
  • 6