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

Add FilterLogEvents policy to policy templates. #523

Closed
wants to merge 4 commits into from

Conversation

jbasden
Copy link

@jbasden jbasden commented Jul 25, 2018

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.

This commit essentially copies the pattern of commit #408
to add a policy template that permits calling the
filter log events cloudwatch API.
@ylynn ylynn changed the base branch from master to develop July 25, 2018 19:53
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",
Copy link
Contributor

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.

Copy link
Author

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}*",
Copy link
Contributor

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.

Copy link
Author

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.

Joshua Basden added 2 commits July 26, 2018 10:24
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.
@jbasden jbasden closed this Jul 26, 2018
@jbasden jbasden deleted the filter_log_events_policy_branch branch July 26, 2018 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants