Hey,
I’ve created some basic test projects via the AWS dashboard/CLI … great…
Then..
I decided to try and embrace using the AWS CDK (v2) for my new project. Thinking I could do it all from the CDK and embrace the code as infrastructure approach. Which suits me as I prefer code anyway.
Simple Goal:
Create a single page web site with a Amplify React login/signup form, linked to cognito pool. Which I could then expand on.
Success & Failures: Success:
CDK successfully deploys and creates Cognito Pool.
Problems:
I did have it also create the Amplify App as well, but despite making the User/Client Pool IDs made available, it would not link it up to the User Pool.
I could try and enable it via the backend in the in the AWS dashboard but again that then risks drift and breaking the CDK approach.
Approach 2:
I use the Amplify CLI (amplify init) and create the amplify app this way.
But how do I get it to use the same pool as created by CDK. (I’ve tried and it just keeps creating new pools).
Failures:
It feels like, despite watching/reading and testing a thousand things. I’m still misunderstanding how this should work and it’s probably bloody obvious. :-).
I could of course choose not use CDK and do it via the dashboard or CLI but that seems to defeat the point of getting to grips with the CDK approach and making something more future proof and learning some new skills along the way.
Been at this simple task for days… and despite learning lots, I’m still lost in the weeds/sea (banging my head against a frustrating brick wall of failures. ![]()