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

Add event switch to sam build

Open ms-clovis opened this issue 7 years ago • 3 comments

I wish sam build had an event (switch/flag)(ie. -e) that could point at the event file and simply move and rename the event file to the build directory.

sam build .... -e or --event foo.json would be moved to the build directory and renamed event.json for the invoke command.

ms-clovis avatar Apr 30 '19 13:04 ms-clovis

@ms-clovis Can you describe what value this provides? Build is meant to compile/produce artifacts ready to be package/deployed/invoked. What would be the need to have the even.json file with the artifacts instead of in your project's source?

jfuss avatar Apr 30 '19 14:04 jfuss

In the same way sam build -t moves and renames the template, then the user would have the template and event json in the build folder for running a local test. I hope that makes sense to you.

ms-clovis avatar May 11 '19 01:05 ms-clovis

@ms-clovis if you still have this issue, please reopen. it should not be relevant to the current version of sam cli

morefaey avatar Sep 24 '20 21:09 morefaey