-
Notifications
You must be signed in to change notification settings - Fork 819
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 use AmplifyHelpers in a standalone CDK app #13584
Comments
Hey @OperationalFallacy, thank you for reaching out. using the |
I've looked at the source code, indeed the cdk helper is too specific for working with amplify resources. Perhaps next project I'll try gen 2, the @aws-amplify/backend does look like it could solve many of this problems. On the other side, I still want native cdk pipelines, not sure if new backend can work with it. The use case was to setup custom auth domain for Cognito. I found a solution eventually, had to add SSM string param to a custom resource in Amplify
Then in the standalone CDK app
Hope this solution helps people looking to integrate amplify with external CDK apps. |
|
How did you install the Amplify CLI?
yarn
If applicable, what version of Node.js are you using?
20
Amplify CLI Version
12.10.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
Describe the bug
When I try to use amplify helper in a standalone CDK app (which is NOT a custom resource inside amplify app, it's completely separate folder with cdk project) like this
ln -s ../myApp-api/amplify amplify
I got the error
❌ myAppPipelineCDK-main/dev/myAppAmplify (dev-myAppAmplify) failed: Error: The following CloudFormation Parameters are missing a value: authmyAppxxx221xxxIdentityPoolId, authmyAppxxx221xxxIdentityPoolName, authmyAppxxx221xxxHostedUIDomain, authmyAppxxx221xxxOAuthMetadata, authmyAppxxx221xxxUserPoolId, authmyAppxxx221xxxUserPoolArn, authmyAppxxx221xxxUserPoolName, authmyAppxxx221xxxAppClientIDWeb, authmyAppxxx221xxxAppClientID, authmyAppxxx221xxxGoogleWebClient
Expected behavior
Isn't it supposed just work? Or there is something tangled between amplify project and custom cdk application inside amplify?
So why would I not use custom CDK resource in Amplify?
Well, I tried that and run into another problem of importing properties from existing resources managed outside of Amplify. For example, a hosted zone.
Amplify cli doesn't understand CDK well, especially permissions around CDK Pipelines, thus I hoped that a standalone cdk app would work better.
I also couldn't find design document how these helpers supposed to work, it looks like they add bunch of dependencies somewhat in form of CF parameters? What if I need only user pool id, a simple string?
Reproduction steps
Create CDK app and try to access any backend properties from amplify.
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: