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

Grant custom table permissions from fromTableArn #7617

Closed
jkar32 opened this issue Apr 27, 2020 · 1 comment
Closed

Grant custom table permissions from fromTableArn #7617

jkar32 opened this issue Apr 27, 2020 · 1 comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@jkar32
Copy link

jkar32 commented Apr 27, 2020

Granting more fine-grain permissions with Table.fromTableArn(...)

Currently, when using Table.fromTableArn(...) you are only able to

  • grantReadData(...)
  • grantReadWriteData(...)
  • grantStreamRead(...)
  • grantTableListStreams(...)
  • grantWriteData(...)

I would like to add

  • grant(...)

Just like Table allows you to when not getting the table from fromTableArn

Use Case

I discovered that I wanted to use more fine-grain control, E.g. not give scan ability in a lambda and the table was described in another stack.

Proposed Solution

import db = require("@aws-cdk/aws-dynamodb");

const table = db.Table.fromTableArn(
            this,
            `${id}Table`,
            cdk.Fn.importValue(TABLE_ARN)
        );

accountTable.grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant;

This is a 🚀 Feature Request

@jkar32 jkar32 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 27, 2020
@jogold
Copy link
Contributor

jogold commented Apr 27, 2020

Duplicate of #7473

@jkar32 jkar32 closed this as completed Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants