Open Rayv1 opened 3 years ago
I have marked this as a feature request. We will pick this up once the task gets prioritized.
I too have this issue.
So the fix, for now, is to name the Secrets Manager Secret as rds-db-credentials/]My ARN for my Secret] ? I haven't been able to get it to work this way either.
@Etep15 yes that would be a solution. What I did is to pull the amplify-cli and build my own version without the above code. I then get the list of all Secrets and can select accordingly.
So for anyone else running into this issue the key is to use the RESOURCE_ID of the RDS serverless cluster.
Not the ARN and not the DB cluster ID.
On the web console go to your RDS and pick the "Configuration" tab. In there is "Resource ID". This is what you want to use. So when creating your secret in the Secrets Manager the name should look like...
rds-db-credentials/cluster-XXXXXXXXXXXXXXXXXXXX
Obviously all those X's will be replaced with what you have listed as your Resource ID.
Once you have the secret created, run amplify api add-graphql-datasource and it should be happy.
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
14.17.6
Amplify CLI Version
6.3.1
What operating system are you using?
Ubuntu
Amplify Categories
storage
Amplify Commands
env
Describe the bug
Iam using CDK to deploy our RDS Serverless Cluster and related Secret Manager Secrets. When adding a new env to our App, i can select the RDS Cluster but not the related Secret and amplify throws "No RDS access credentials found in the AWS Secrect Manager." When looking at:
https://github.com/aws-amplify/amplify-cli/blob/81cc461ed5e02b2f296825283993ad026f1126d1/packages/amplify-category-api/src/provider-utils/awscloudformation/service-walkthroughs/appSync-rds-walkthrough.ts#L144-L147
It seems like the name has to be 'rds-db-credentials/${clusterResourceId}'. As we have a different naming convention, we cant name it like this. It would be nice if the secret is not found, that promptWalkthroughQuestion is started with all secrets found in the account.
Expected behavior
If no Secret found with specific name, start promptWalkthroughQuestion with all secrets
Reproduction steps
GraphQL schema(s)
Log output
Additional information
No response