-
Notifications
You must be signed in to change notification settings - Fork 2.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 FilterLogEvents policy to policy templates. #523
Conversation
This commit essentially copies the pattern of commit #408 to add a policy template that permits calling the filter log events cloudwatch API.
Instead of using "Resource": "*", this commit changes the resource field to use only the Log Group specified.
@@ -1239,6 +1239,34 @@ | |||
} | |||
] | |||
} | |||
}, | |||
"FilterLogEventsPolicy": { | |||
"Description": "Gives permission to filter Log Events from any Log Group", |
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.
Update the description since you change the Resource to scope down to one log group.
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.
Good catch. Thanks
], | ||
"Resource": { | ||
"Fn::Sub": [ | ||
"arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::Account}:log-group:${logGroupName}*", |
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.
Do you need the "*" at the end? You can try the policy definition in your own template to figure out.
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.
I put it there because of the lambda invoke example I was following. I don't believe it is needed though.
This commit scopes down the access for the filter log events policy by removing the trailing star from the end of the resource field.
These whitespace changes came from Atom's default settings, and were unintentional.
This commit essentially copies the pattern of commit #408
to add a policy template that permits calling the
filter log events cloudwatch API.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.