-
Notifications
You must be signed in to change notification settings - Fork 79
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
fix: fix policies with overridden table names #3075
fix: fix policies with overridden table names #3075
Conversation
packages/amplify-graphql-model-transformer/src/resources/dynamo-model-resource-generator.ts
Outdated
Show resolved
Hide resolved
|
||
while (isTruncated) { | ||
const params = marker ? { Marker: marker } : {}; | ||
const response = await service.listRoles(params).promise(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need paginated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late response to this comment: the listRoles
response is paginated, using Marker
as the "next token" equivalent. See https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iam/command/ListRolesCommand/
This reverts commit fdcb760.
Description of changes
Fixes policy resources generated for tables with overridden names. The change is simple: it removes the
withoutPolicyUpdates()
modifier from the role returned during DDB resolver resource creation. This allows Amplify's call to the AppSync CDK APIaddDynamoDbDataSource
to set up a default policy. That grant API uses the table construct to determine the name, rather than relying on the Amplify naming convention. The default policy is therefore scoped to table & index resources with the appropriate name.Issue #, if available
#3006
Description of how you validated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.