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

ITable does not implement grant() api #7473

Closed
amwill04 opened this issue Apr 21, 2020 · 2 comments · Fixed by #7618 or bifravst/cloudformation-cleaner#13
Closed

ITable does not implement grant() api #7473

amwill04 opened this issue Apr 21, 2020 · 2 comments · Fixed by #7618 or bifravst/cloudformation-cleaner#13
Assignees
Labels
@aws-cdk/aws-dynamodb Related to Amazon DynamoDB bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@amwill04
Copy link

Unsure if this is a bug or a limitaion/missing feature

Importing a dynamodb table using fromTableArn or fromTableName implements an ITable but this does not include the grant() method.

const table = new Table(...);
table.grant(....) // works

const table = Table.fromTableName(...)
table.grant(....) // grant does not exist on type ITable

Environment

  • **CLI Version :1.33.1
  • **Framework Version:1.33.1
  • **OS :macos
  • **Language :typescript

This is 🐛 Bug Report

@amwill04 amwill04 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 21, 2020
@jogold
Copy link
Contributor

jogold commented Apr 21, 2020

It's present on TableBase but unfortunately missing on ITable.

@RomainMuller could be easily added to #7453?

@amwill04
Copy link
Author

@jogold the simple work around is to cast as a Table which works for me.

const table = Table.fromTableName(...)
(table as Table).grant(....) // grant now available

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