Open cyrfer opened 4 years ago
...and I just learned that the code generated has no file named index.js
which is expected by the deployment and runtime errors occur because it is missing. Instead custom.js
has the .handler
entry point.
🐛 BUG
+1. Any update on this? I want to add a "Migrate User Lambda Trigger" but the new documentation does not mention how to add triggers at all: https://docs.amplify.aws/cli/auth/overview
I have a new plan for solving this. I think you can use the CLI to scaffold a basic function resource, and then manually enhance the generated cloudformation template.
There is a pretty nice DSL for passing parameters around, and you can hack the cloudformation template to accept and use these parameters. For an example injecting parameters, see https://github.com/aws-amplify/amplify-cli/issues/3240#issuecomment-623499312
Noticed this issue after I opened a related one, so linking it: https://github.com/aws-amplify/amplify-cli/issues/4326
Any updates on this?
Any updates?
Looks like this is an old request. I recently opened https://github.com/aws-amplify/amplify-cli/issues/12608 for the same reasons.
Is your feature request related to a problem? Please describe.
I'd like to insert a new record into a user collection when a user confirms signup. This seems like a trivial thing. It's not. Since GraphQL mutations can be observed, I'd like to use the API (from the triggler lambda) to insert the record.
It seems impossible to add a trigger for auth post-confirm events that can invoke the API.
The closest I've come is:
With this flow, I am blocked as I cannot get access to the API resource injected into my lambda code.
Also, I don't love the name chosen for the lambda resource. It seems based on the poorly chosen name for the auth resource.
Describe the solution you'd like
I expect the following flow to work:
Describe alternatives you've considered Already mentioned above.
Additional context Has anyone used the lambda trigger feature? It's touted here and here, but it's really difficult to setup.
I mean, how do you even start the mentioned "manual Auth CLI workflow"? It's really buried under "amplify auth update". https://aws-amplify.github.io/docs/cli-toolchain/quickstart#adding-a-lambda-trigger