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

(aws-appsync): RdsDataSource misses option to set dataBaseName and expects incorrect cluster #12503

Closed
monholm opened this issue Jan 14, 2021 · 3 comments
Assignees
Labels
@aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@monholm
Copy link
Contributor

monholm commented Jan 14, 2021

It seems like there's no way to add the databasename to a RdsDataSource, which results in a "No database selected" error when running a resolver.

Besides that, RdsDataSource expects a DatabaseCluster and not a ServerlessCluster.

https://docs.aws.amazon.com/cdk/api/latest/docs/aws-appsync-readme.html#aurora-serverless seems outdated as well, and should probably be updated when a solution for the above-mentioned problems have been found. I will open a seperate issue for the doc issue, if/when this becomes relevant.

Reproduction Steps

const api = new GraphqlApi(stack, 'api', {
  name: 'graphqlApi',
  schema: Schema.fromAsset('./testSchema.graphql'),
});

const serverless = new ServerlessCluster(stack, 'cluster', {
  engine: DatabaseClusterEngine.AURORA_MYSQL,
  vpc: new Vpc(stack, 'vpc'),
});

api.addRdsDataSource('rdsDS', serverless, serverless.secret!);

What did you expect to happen?

addRdsDataSource to include a prop for databaseName and to expect IServerlessCluster.

What actually happened?

There's no prop for databaseName and it expects IDatabaseCluster.

Environment

  • CDK CLI Version : 1.83.0
  • Framework Version: 1.83.0
  • Node.js Version: 14.5.4
  • OS: MacOs 10.15.7
  • Language (Version): TypeScript (3.9.7)

This is 🐛 Bug Report

@monholm monholm added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 14, 2021
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label Jan 14, 2021
@monholm monholm changed the title (aws-appsync): RdsDataSource misses option to set dataBaseName and expects incorrect cluster. (aws-appsync): RdsDataSource misses option to set dataBaseName and expects incorrect cluster Jan 14, 2021
@monholm
Copy link
Contributor Author

monholm commented Jan 14, 2021

Having had a look at the relevant code, I might be able to take a stab at it, if someone could confirm that I'm not missing anything obvious.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or 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.

@BerndWessels
Copy link

this is still not resolved in "@aws-cdk/aws-appsync": "^1.89.0", and renders RdsDataSource useless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants