Is your feature request related to a problem? Please describe.
My use case is I need to create some utility scripts that do some admin on our backend (e.g. add users to cognito groups, backfill data, dump data from dynamo, etc..). I'm currently doing these via the function category, even though I only plan to run these functions locally and I don't care about deployment.
This is equivalent scenario to the reason why rails has rake tasks.
Functions are great, but I have a scenario now where I want to pass parameters to a function via the command line without having to create a new event.json since these parameters are a one-off thing.
Describe the solution you'd like
Pass "context" or "event" via command line without having to create a file.
Describe alternatives you've considered
Hardcode parameter values in the index.js and change them every time function is executed or create a specific event.json
Additional context
I basically want something equivalent to rake tasks in rails - a series of adhoc tasks that an admin might need to run on the backend via command line. The tasks usually will not be run by the app itself.
Please note, as originally mentioned in https://github.com/aws-amplify/amplify-cli/issues/1975
Besides passing in an event on the CLI, there are two other issues mentioned in my original issue that I feel warrant attention:
Allow me to pass _all_ of the arguments (name of function, src file, handler name, and event) on the CLI invocation
Give me sane defaults for all items in point one above where it makes sense
Most helpful comment
Please note, as originally mentioned in https://github.com/aws-amplify/amplify-cli/issues/1975
Besides passing in an event on the CLI, there are two other issues mentioned in my original issue that I feel warrant attention:
Allow me to pass _all_ of the arguments (name of function, src file, handler name, and event) on the CLI invocation
Give me sane defaults for all items in point one above where it makes sense