Skip to content

Instantly share code, notes, and snippets.

@swyxio
Last active June 5, 2020 12:30
Show Gist options
  • Select an option

  • Save swyxio/1583bfcdadaced75df742fbe1a260d56 to your computer and use it in GitHub Desktop.

Select an option

Save swyxio/1583bfcdadaced75df742fbe1a260d56 to your computer and use it in GitHub Desktop.
amplify docs requests
@swyxio

swyxio commented Jun 3, 2020

Copy link
Copy Markdown
Author

Cognito

It looks like the Pre Sign-up Lambda Trigger should be used for custom validations. You can prevent sign ups that way, but there is no way to really create a good response to it. You can just throw 'some-message' and the response will be 400: { "__type": "UserLambdaValidationException", "message": "PreSignUp failed with error some-message." }.
This makes it very hard to create a good UX in the frontend, because it's hard to really handle a couple of different reasons I need to match() the message now with a RegExp.

# CDK

CDK is sooo good. I actually just used Amplify to easily test the auth process in a mocked frontend and have no need for Amplify infrastructure. It would be actually awesome (in my very personal limited view) if Amplify would just offer some nice CDK packages I can integrate into my existing CDK infrastructure code. Like "Amplify offers opinionated CDK constructs" while CDK on its own is unopinionated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment