Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add auth triggers through CLI #12991

Closed
2 tasks done
kevinxu3 opened this issue Jul 23, 2023 · 5 comments
Closed
2 tasks done

Can't add auth triggers through CLI #12991

kevinxu3 opened this issue Jul 23, 2023 · 5 comments
Labels
auth Issues tied to the auth category of the CLI pending-triage Issue is pending triage

Comments

@kevinxu3
Copy link

kevinxu3 commented Jul 23, 2023

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v18.16.0

Amplify CLI Version

12.1.1

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Describe the bug

I'm trying to update my auth triggers with existing lambda functions but I get this error from CloudFormation:

Parameters: [functioncircleAuthPreSignupArn, functioncircleAuthPreSignupLambdaExecutionRole, functioncircleAuthPreSignupName, ...{same pattern for other functions}...] must have values

I had issues getting the cli to run perfectly so I manually changed some things in cli-inputs.json.
This is the error when trying to update auth config.

? Which triggers do you want to enable for Cognito Create Auth Challenge, Define Auth Challenge, Pre Sign-up, V
erify Auth Challenge Response
? What functionality do you want to use for Create Auth Challenge Create your own module
? What functionality do you want to use for Define Auth Challenge Create your own module
? What functionality do you want to use for Pre Sign-up Create your own module
? What functionality do you want to use for Verify Auth Challenge Response Create your own module
Error updating the Cognito trigger: The "path" argument must be of type string. Received undefined

Possible related to this (#12784)

Expected behavior

Stack deploys correctly with lambdas set as triggers

Reproduction steps

Create lambdas for auth triggers then add those lambdas through the cli or cli-inputs.json. Deploy and it will fail.

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@kevinxu3 kevinxu3 added the pending-triage Issue is pending triage label Jul 23, 2023
@ykethan ykethan added the auth Issues tied to the auth category of the CLI label Jul 24, 2023
@ykethan
Copy link
Member

ykethan commented Jul 24, 2023

Hey @kevinxu3, thank you for reaching out. could you let us know the changes made on the cli-inputs.json file? as this would enable us in reproducing a identical environment.

@ykethan
Copy link
Member

ykethan commented Jul 24, 2023

additionally noticed that you are looking to add existing Amplify CLI created Lambda functions as a trigger on the Auth resource. unfortunately this is currently not supported by Amplify CLI.
Could you try reverting the changes made on the cli-inputs.json, then run amplify update auth to add the triggers?

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Jul 24, 2023
@kevinxu3
Copy link
Author

Got it. I resolved this by creating new triggers and copying over code. Thanks!

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Jul 24, 2023
@ykethan
Copy link
Member

ykethan commented Jul 26, 2023

Glad to hear you are back up and running. Closing the issue, please feel free in reaching out to us again.

@ykethan ykethan closed this as completed Jul 26, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues tied to the auth category of the CLI pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

2 participants