-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix(PolicyTemplate): DynamoDBStreamReadPolicy #1222
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(PolicyTemplate): DynamoDBStreamReadPolicy #1222
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1222 +/- ##
========================================
Coverage 94.43% 94.43%
========================================
Files 72 72
Lines 3736 3736
Branches 739 739
========================================
Hits 3528 3528
Misses 105 105
Partials 103 103 Continue to review full report at Codecov.
|
It is a fix but it still feels a bit like a workaround. Do we maybe have a way to have this added to ddb: Desired: ddb already supports: Minor side note, Can thus be simplified to: |
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.
Looks good, just one change and it should be good to go!
"Action": [ | ||
"dynamodb:ListStreams" | ||
], | ||
"Resource": "*" |
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.
Could we tighten the resources that this applies to? This way, they can list all the streams for the table that they specify in the policy template, or all streams if the user specifies a "*" for TableName.
"Resource": {
"Fn::Sub": [
"arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}/stream/*",
{
"tableName": {
"Ref": "TableName"
}
}
]
}
Issue #, if available: #289
Description of changes:
Please refer to #289 (comment)
Description of how you validated changes:
I deployed sam app like this:
ProcessDDBStreamFunction's Role got the policies as below:
I associated the function with the ddb manually, then I created records into the ddb.
I verified that the function was triggered by ddb streams events successfully.
Checklist:
make pr
passesUpdate documentationAdd/update example toexamples/2016-10-31
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.