-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: AthenaQueryPolicy template #1137
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1137 +/- ##
========================================
Coverage 94.33% 94.33%
========================================
Files 72 72
Lines 3725 3725
Branches 733 733
========================================
Hits 3514 3514
Misses 107 107
Partials 104 104 Continue to review full report at Codecov.
|
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.
verified these policies from link: https://docs.aws.amazon.com/athena/latest/APIReference/API_Operations.html
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.
@nheijmans looking at this AWS docs there are more permissions required for accessing a specified athena workgroup - https://docs.aws.amazon.com/athena/latest/ug/example-policies-workgroup.html
Could you add those as well?
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.
@praneetap Yep I'll add them as well!
@nheijmans Thank you for contributing this feature!! |
Added in PR #1158! |
@nheijmans I added test cases for this and also resolved the merge conflicts. This PR looks good to me |
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.
nit: indentation
@nheijmans The tests need to be updated as well, the build is failing currently. Once you fix that it should be ready to go :) |
How can I do that? Can't find this in GitHub :( Sorry for replying late, was on leave... |
Added a template where a Athena workgroup can be queried and the results retrieved. By default the workgroup "primary" will be used but with the parameter a user can change it to the desired workgroup
Added the template policy for Athena to execute queries on a workgroup. Workgroup can be named with the parameter
Added the additional access needed as per referenced document https://docs.aws.amazon.com/athena/latest/ug/example-policies-workgroup.html#example1-full-access-all-wkgs excluding the deletion part which I think is a bit much for SAM
Rebased and fixed the tests 👍 |
Issue #, if available:
#1136
Description of changes:
Added the policy for Athena to the policy_template.json file
Description of how you validated changes:
Added the suggested code to the local file and checked with a workgroup if access was granted and queries could be executed.
Checklist:
make pr
passesexamples/2016-10-31
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.