aws-sam-cli
aws-sam-cli copied to clipboard
init an internal lambda function?
sam init --runtime go1.x
appears to create an API gateway type of function. What happens if I want to create a function that gets triggered by SNS or some direct lambda call (with JSON payload) instead??
you can always sam local invoke{functyion_name} --event event.json
. You should be able to specify an event you want with sam local generate-event
.
Other events are listed here: https://github.com/aws/aws-lambda-go/tree/master/events
Nonetheless my template.yaml has this API gateway cruft, no?
the init also creates a hello-world
directory. Ideally main.go is in the top level directory as to not break a go get
.
Current generated Makefile is missing sam {package,deploy} stanzas making it pretty useless.
Bit confused at what the baseline role should be for a function. Ideally this template would get you going with that question.
There are a bunch more patterns at https://serverlessland.com/patterns I'm going to close this issue in favor of that, we can re-open this issue if there are other use cases that need to be supported.