-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add indexes to dynamodb.Table.fromTableAttributes #6392
Comments
The ITable grant thing is also causing us problems. We are instantiating an ITable via Table.fromTableArn(). When we do this, permission grants to lambda functions do not include the extra entry for the indexes in the Resource: Using the Table construct we get e.g.:
When using Table.fromTableArn() we do not get the second line and any operations on the indexes are denied. We also had to make changes elsewhere because ITable does not offer the grantFullAccess() method. |
This is a bit of a blocker for us also - are there any plans to get this added? We do have a workaround which looks a bit like this:
It works but it would be good to have indexes included for permissions out of the box |
For imported Tables, the grant() methods skipped adding permissions for indexes, as there was no way of providing the indexes on import. This change adds globalIndexes and localIndexes properties to the TableAttributes interface, so you can now provide indexes when calling Table.fromTableAttributes(). Fixes aws#6392
For imported Tables, the `grant~()` methods skipped adding permissions for indexes, as there was no way of providing the indexes on import. This change adds `globalIndexes` and `localIndexes` properties to the `TableAttributes` interface, so you can now provide indexes when calling `Table.fromTableAttributes()`. Fixes #6392 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Right now, we don't allow passing indexes to
dynamodb.Table.fromTableAttributes()
. This means that methods likegrantRead
do not include the stream ARN for these Tables, even if in reality they have streams enabled.We should add optional properties
localIndexes?: string[]
andglobalIndexes?: string[]
toTableAttributes
. This should also allow us to add a bunch of methods to theITable
interface that were thus far only available onTable
, likeautoScalReadCapacity()
.See this comment and below for more context why is this needed.
The text was updated successfully, but these errors were encountered: